1, add line number
Right-click on the side margin
Check
2. Change font
Window-Preferences
Common configuration of Fonts
Consolas One problem is that Chinese fonts are hard to see
There are two ways of solving this:
First, set the font to Courier New
Operation steps: Open Elcipse, click on the menu bar "Windows"--click "Preferences"--click "Genneral"--click "Appearance"--click "Colors and Font"--In the right box expand " Basic "folder-double-click on" Text Font "-select" Courier new "in the popup window (note:" Courier new "may not be found here, click the" Show more Fonts "link in the lower left corner of the font selection box to open the Control Panel to set the font, find" Courier New ", right-select" show "to activate the font)--click the button" OK "--click the button" OK "to complete.
Second, use mixed fonts instead of Consolas fonts.
Operation Steps:
1. Download Consolas and Microsoft ya Black Hybrid font (address: Http://files.cnblogs.com/icelyb24/YaHei.Consolas.1.12.rar)
2. After extracting, copy the Yahei.consolas.1.12.ttfw file to the C:\Windows\Fonts directory and complete the font installation.
3. Open Elcipse, click "Windows" on the menu bar--click "Preferences"--click "Genneral"--click "Appearance"--click "Colors and Font"--expand "Basic" in the right box Folder--Double click on "Text Font"--select "Yahei.consolas" in the popup window--click the button "OK"--click the button "OK" to complete.
3, remove the spelling error check
4. Java Code Style
Shortcut keys CTRL + Shift + F
Click the New button to create a new style.
Click OK
Selected label braces curly braces
And then edit the other styles.
Click the Edit button on the previous level menu
5. Content Assist setting
6. JDK Add, select and compile Settings
JDK Additions
Click the Add button on the right
Compilation settings
7. Modify Smart Prompt options
Description dot. and input @ will have a hint.
Configure shortcut keys Content Assist
Settings below
8. Enhanced Eclipse (MYECLIPSE) Input code hint function 8.1, general settings
(1). Open Eclipse and select Open Window-Preferences.
(2). Select "Java--editor--content Assist" on the Directory tree and "Auto-activation" on the right to find the "Auto Activation triggers for Java" option. The default triggering code hint is "." This symbol.
(3). In the "Auto Activation triggers for Java" option, in the "." Plus ABC letters. 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 and 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", then click "Finish" button to complete the operation.
At this point, eclipse can trigger code hints based on the English letter (uppercase or lowercase) just edited, and it is easy and quick to carry the entry.
Set each file edit prompt to be windowàpreferences and then search for content Assist
But it's a little different when you're setting up a particular editor.
Take Java and XML for example
Java
Xml
8.2, change the space and the "=" Problem of automatic screen
Previously only know alt+/recall assist, and later found that all the letters can be activated content assist (8.1 in writing). It is really cool to use, but eclipse still has some default settings are not very good, such as the space bar and the = number will be the first line of content automatically screen, in fact, many times I just want to lose a space or = number. There is no way to set this in the settings, fortunately Eclipse is a plug-in mechanism, you can modify the plug-in source, and then exported to plug-ins, and then replace the original plugin to deal with.
1. Find the relevant plugin 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 the 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 if judgment, eclipse will determine if key (that is, the key you pressed) is in the triggers, and if it is, then trigger the code on the first line below, 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 on the Org.eclipse.jface.text in your workspace, select Export-->deployable plugins and Fragments, next,destination Select archive File, then finish. You can see the generated jar in the zip file and replace it with the same name jar package in Eclipse/plugins.
if (key!=0x20 && key!= ' = ' && key!= '; ' && contains (Triggers,key))
The last is to export the modified plug-in, right-click on the project in your workspace, select Export->deployable Plugins and Fragments, click Next, select the Destination tab, Select Directory, select a catalog where you want to save the plugin, and then finish. You will then create a new plugins directory in your chosen directory with a jar file that replaces the org.eclipse.jface.text_3.6.1.r361_ inside the eclipse/plugins. V20100825-0800.jar (this file is different version of Eclipse, the later version number will not be the same, I use Eclipse 3.6), so it's done!
9. Import JUnit
Right-click on the project and choose Build Pathàadd Libraries
10, modify the code 10.1, the project code
Right-click on the project to select Porperties
Choose Resource UTF-8
10.2. Format encoding
Window->preferences->general->editors->text editors->spelling
The settings here are generally related to the display text in the editor of the Code, and the setup errors will be garbled
Then manually fill in the GB18030
Eclipse Editor Configuration