Eclipse uses:
1. How do I recall the eclipse closure prompt?
You can open this hint: Select Windows--preferences, select "General" on the left tree-"Startup and Shutdown", select "Confirm exit when closing last window" single Just click OK.
2, the Eclipse edit box to the right of the length 100 position set a line
Windows--->preferences--->general--->editors--->text Editors, in this case, the show print margin selected, print Margi Fill in the length at column
3, Eclipse default setting of the change of the degree, after formatting code, often line, very ugly.
Window->preferences->java->code style->formatter->edit->line Wrapping->Maximum line width: Default 80
Rebuild a profile name and change the maximum line width to about 100.
4, modify the single-line comment length
Window->preferences->java->code style->formatter->edit->comments Find line width set maximum line Width for Comments: The value is changed to about 100 on the line
5. Automatically generate comments when new
Windows-->preference->java-->code style-->code templates->code-->new Java file
${filecomment}${package_declaration}
/**
* @author jacksile e-mail:[email protected]
* @date ${date} ${time}
* @function
* @version 1.0
* @parameter
* @since
* @return
*/
${typecomment}${type_declaration}
The remaining comments can be edited in Windows-->preference->java-->code Style-->code templates->comments or in the Code node
6, Format the current file code, all files in a folder, or the entire project code
Single file: Right-click Source->format in the file or use shortcut key
All files in folder: Folder Right-click Source->format
entire project: SRC Right-click Source->format
7, highlight when the forward
Editors->text editors->current Line highlight, but Blue is best, other can adjust the color and background of the selected font, usually set to the font color is white, the background color is pink, Search text or color or editors can set more content, Syntax coloring (can adjust the interface word color)->annotation element references (annotation element reference), Auto (un) Boxed expressions (color of variable at output), local variables declarations (set variable color), local variables (can adjust call variable color), Parameter Variables (method internal variable name) "uniformly set to blue"; method declarations (description) with brown bold; Quick Diff (difference) changes (purple) additions (orange) deletions (brown)
8. Change the current format shortcut key and change the ctrl+shift+f to Ctrl+alt+space
9. Custom View
"window"→"customize perspective..." →"shortcuts" Tags: You can add specific views to "open perspective" or "show view" menu options, "commands Groups availability" Tags: You can add specific views to the menu bar
10. How to remove some of the annotations that are automatically appended to eclipse
1. In the menu bar window---Preferences-->java-->code Style-->code templates--> Code---Body, then click Edit on the right (edit) button, you can remove the Auto-generated method stub
2, in the menu bar window---Preferences-->java-->editor-->templates then find the Try option, double click to edit, will//Todo:handle exception remove
Of course you can also edit other options.
problem solution:
1, exception: "Software Update" appears: Error retrieving "Feature.xml". [Error in opening zip file] Incorrect prompt
workaround: Delete site.xml
under Eclipse root
2, server Configuration error
question: Could not publish Server configuration for Tomcat v7.0 server at localhost.
solution: Workaround 1: Change the server.xml to remove the duplicate context
path: tomcat/conf server.xml
workaround 2: Delete the entire server folder and add the server again. Recommend this practice, because if you modify the Server.xml, accidentally deleted the wrong, then there will be problems.
3, Exception: The class file Collision:a resource exists with A different case:/test/testframe$myactionlistener.class.
workaround:
2, remove Project->build Automatically before the tick
3, select Project-> Clean
4, tick Project->build Automatically, recompile
If the above execution is not resolved, Then select Project->properities, delete all history in refactoring and follow the steps above
4. Exception: Eclipse tip: A problem occurred when calling code from a plug-in: "Org. Eclipse.jface "exception
Workaround: Delete the workspace and re-establish the new Wordspace
5. Abnormal phenomenon: Prompt java.lang.UnsatisfiedLinkError:no swt-win32-3232 in Java.library.path when developing interface with SWT
Solution: Need to put eclipse\plugins\org. Eclipse.swt.win32.win32.x86_3.2.0.v3232m.jar inside of the Swt-win32-3232.dll extract copied to Windows\System32 inside.
6, Exception: Eclipse does not have the automatic prompt function, to press the "alt+/" key will produce the prompt
workaround:
1, This method is used for situations where there is no hint: open windows--preferences--java--editor--content assist--advanced above eclipse in turn, and in the upper right there is a line "select the Proposal kinds contained in the ' Default ' content assist list, tick the Java prolosals check box to save the exit.
2, turn on the windows--preferences above eclipse --general--keys, there is a search box under scheme, enter "content Assist" in the Search box, select "Content Assist", change the binding item to "alt+/" (Press "/" key to change), Select the When item to editing text,
7, Eclipse Import project appeared red exclamation mark
This is generally a classpath problem, because in my own development environment, my LIB library is my own user library, referencing my own class, but when others import into their eclipse, Eclipse views the configuration of the. classpath file and discovers that there is no need for the class library, of course there is a problem.
This also reminds yourself that the package referenced in the project's build path is best not to be a standalone user library, but should refer directly to the class library in Web-inf/lib for ease of publication, and path problems are not easy to come by.
8. Error: The type Java.lang.Object cannot be resolved. It is indirectly referenced from Required.class files
Solution:
the reason for the above information is because you have multiple versions of the JRE or JDK relationship. Eclipse will automatically refer to your JRE path when you set up the project, but there is no way for multiple versions.
you can only manually build ...
A. Enter window\preferences\java\installed JREs
1) Press Add to select Standard VM
2) Enter JRE Name, example jdk1.x
3) JRE home, click Directory, select the path to install
4) Press OK
B. Enter Project\properties\java Bulid Path
1) ADD Library
2) Select JRE System library and press Next
3) Select Workplace default JRE and press Finish ...
9. Error: An internal error occurred during: "Initializing Java tooling" occurs when Eclipse starts. Error resolution
Solution:
Delete the. Metadata/.plugins/org.eclipse.core.resources/.project under the current working directory, and then restart Eclipse
10, Error: @override errors
The first of these solutions:
@Override is JDK5 already have, but there is a small bug, is not support the implementation of the interface, think this is not an override and JDK6 fixed the bug, whether the parent class method overrides or the implementation of the interface can be added @override
Modify your eclipse-specific compiler version
Specify a version at least 5.0 in the Java compiler option
The method of changing the compiler in MyEclipse: Project->properties->java compiler->configure Workspace Setting, can be set in the popup page.
Second Solution: (I use this method, no problem)
The use of @override in Java 1.5 and 1.6 is somewhat different, although the JRE has been changed, but eclipse will still make an error.
WORKAROUND: Windows->preferences-->java->compiler-->compiler compliance level is set to 1.6 OK.
11. resource File not found
The resource file should be placed in the SRC directory
Eclipse usage and its problem solutions