Eclipse Editor Basic Settings
1, add line number
Right-at the edge
2, change the font
General configuration of Fonts
3, remove the spelling error check
4, Java code style
Code formatting
Ctrl + Shift + F
Then click on the New button on the right to create a new style.
Click OK
The selected label braces curly braces in the figure above
Then edit the other style and click the Edit button on the previous level menu
5, Content auxiliary settings
6, JDK Add, select and compile Settings
JDK add
Click the Add button on the right
Compilation settings
7, modify the smart prompt option
Description of the management. and input @ will be a hint.
Configure shortcut keys Content Assist
Bottom settings
8. Enhanced Eclipse (MYECLIPSE) Input code hint function 8.1, General settings
(1). Open Eclipse and choose open Window-Preferences.
(2). Select "Java--editor--content Assist" on the directory tree and locate the "Auto activation triggers for Java" option on the right side of "auto-activation". The default trigger code hint is "." This symbol.
(3). In the Auto activation triggers for Java option, in the. followed by an ABC letter. Then "Apply" and click "OK".
(4) Select "File--export", select "General--perferences" in the pop-up window, and click "Next".
(5). Select "Export All", then specify the save path, click "Finish" button to generate "*.EPF" file.
(6). Edit the "*.epf" file with a text editor: find ". abc" and modify ". ABC" to:. ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ (, @ then save *.EPF File
(7) Select "File--import", select "General--perferences" in the pop-up window, and click "Next".
(8). Select "*.EPF" file, select "Import All", and then click "Finish" button to complete the operation.
At this point, eclipse can trigger code hints based on the English alphabet (uppercase or lowercase) you have just edited.
When you set each file edit hint, it's windowàpreferences and then search for content Assist
But it's a little different when you set up a particular editor.
Take Java and XML as examples
Java
Xml
8.2, modify the space and "=" The problem of automatic screen
Previously only know alt+/pull out assist, later found that all the letters can be activated content assist (8.1 has written). It's great to use, but eclipse still has some default settings that are not very good, such as the space bar and = number will be the first line of content automatically on the screen, in fact, many times I just want to lose a space or = number. This is not set in the settings, fortunately, Eclipse is a plug-in mechanism, you can modify the source code Plug-ins, and then exported into Plug-ins, and then replace the original plug-ins to deal with.
1. Find the relevant Plug-ins first
Open plug-ins View Find plugin Org.eclipse.jface.text, right click, select Import as Source Project, after the import is complete, you can see this project in your workspace
2. Modify Code
In the Src/org/eclipse/jface/text/contentassist/completionproposalpopup.java file, find such a line of code
Char[] triggers = T.gettriggercharacter ();
If (contains (Triggers,key))
In that line of if judgment, eclipse will determine whether the key (which you pressed) is in triggers, and if so, trigger the first line of code on the screen, so all we have to do is exclude the space and the = number:
if (key!= ' = ' &&key!=0x20&&contains (triggers,key))
3. Export the modified Org.eclipse.jface.text
Right-click the Org.eclipse.jface.text in your workspace, select Export-->deployable plugins and Fragments, next,destination choose Archive File, then finish. You can see the generated jar in the zip file and replace it with the same jar package in the eclipse/plugins.
if (key!=0x20 && key!= ' = ' && key!= '; ' && contains (Triggers,key))
The last is to export the modified plugin, right click on the project in your workspace, select Export->deployable Plugins and Fragments, click Next, select the Destination tab, Select Directory, select a table of contents to save the plugin, and finish. You will then create a new plugins directory in your chosen directory, which has a jar file to replace the org.eclipse.jface.text_3.6.1.r361_ in the Eclipse/plugins. V20100825-0800.jar (this file has different versions of Eclipse, the following version number will not be the same, I use Eclipse 3.6), so it's done.
9, import JUnit
Right-click on the item, select Build Pathàadd libraries