1, add line number
Right-click at the Edge
2. Change 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 tab selected in braces curly braces
Then edit the other styles and then 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, two in MyEclipse8.0 and encoding related settings
10.2.1, 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
10.2.2, setting the Run Configuration and debug configuration
Http://www.cnblogs.com/decarl/archive/2012/01/02/2310017.html
11. Shortcut keys
(1) Ctrl+space
Description: Content Assistant. Provide tips on methods, variables, parameters, Javadoc, etc., should be shipped in a variety of occasions, in short, you need to prompt the time you can press this shortcut. Note: Avoid the switch settings in the Input method conflict with this setting
(2) Ctrl+shift+space
Description: Variable hints
(3) ctrl+/
Description: Add/Remove//comment, in eclipse2.0, remove comment as ctrl+\
(4) ctrl+shift+/
Description: Add/* */Comment
(5) Ctrl+shift+\
Description: Remove/* */Comment
(6) Ctrl+shift+f
Description: Automatic Formatting code
(7) Ctrl+1
Description: Bulk modification of variable names in source code, also available on catch blocks.
(8) Ctril+f6
Description: Interface switch
(9) Ctril+shift+m
Description: Find the package you need
(10) Ctril+shift+o
Description: Automatically introduces the required packages
(11) Ctrl+alt+s
Description: Source code to get a shortcut menu. Among them, generate getters and setters and Surround with Try/catchblock are more commonly used. It is recommended to add them as shortcut keys. Shortcut keys set in windows->preferences-> Workbench->keys
2. List of shortcut keys
Edit
scope function Shortcut keys
Row deletes a row ctrl+d
Global Find and replace Ctrl+f
Text Editor Find previous Ctrl+shift+k
Text Editor Find Next Ctrl+k
Global Undo Ctrl + Z
Global Replication Ctrl + C
Global Restore Previous selection alt+shift+↓
Global clipping Ctrl+x
Global Quick Fix ctrl1+1
Global Content Assist alt+/
Global all check Ctrl + A
Delete delete globally
Global context information ALT +? Alt+shift+? Ctrl+shift+space
Java Editor display tooltip description F2
Java Editor Select encapsulated element alt+shift+↑
The Java editor selects the previous element alt+shift+←
The Java editor selects the next element alt+shift+→
Text Editor incremental find Ctrl+j
Text Editor incremental reverse lookup ctrl+shift+j
Global Paste Ctrl + V
Global Redo Ctrl+y
View
scope function Shortcut keys
Global magnification ctrl+=
Global Shrink ctrl+-
Window
scope function Shortcut keys
Global activation Editor F12
Global Switch Editor Ctrl+shift+w
Global on an editor Ctrl+shift+f6
Globally on a view CTRL+SHIFT+F7
Global on a Perspective view Ctrl+shift+f8
Global Next editor Ctrl+f6
Global Next View Ctrl+f7
Global Next Perspective Ctrl+f8
The text editor displays the ruler context menu Ctrl+w
Global Display View menu CTRL+F10
Global Display System Menu alt+-
Navigation
scope function Shortcut keys
Java Editor Open Structure ctrl+f3
Global Open Type Ctrl+shift+t
Global Open type Hierarchy F4
Global Open claims F3
Global Open External Javadoc shift+f2
Global Open Resource Ctrl+shift+r
Global fallback history alt+←
Global forward History alt+→
Global on a CTRL +,
Global Next Ctrl +.
The Java Editor displays outline Ctrl+o
Global open type Ctrl+shift+h in the hierarchy
Global go to matching parentheses ctrl+shift+p
Global go to previous edit location Ctrl+q
The Java editor goes to the previous member Ctrl+shift+↑
The Java editor goes to the next member Ctrl+shift+↓
Text editor go to line ctrl+l
Search
scope function Shortcut keys
Global presence in file Ctrl+shift+u
Global Open Search dialog box ctrl+h
Claims in the global workspace Ctrl+g
References in the global workspace Ctrl+shift+g
Text editing
scope function Shortcut keys
Text Editor overwrite toggle Insert
Text Editor Roll Line ctrl+↑
The text editor scrolls the line ctrl+↓
File
scope function Shortcut keys
Global Save Ctrl+x Ctrl+s
Global Print Ctrl+p
Global Shutdown CTRL+F4
Global Save All Ctrl+shift+s
Global all off CTRL+SHIFT+F4
Global Properties Alt+enter
Global New CTRL + N
Project
scope function Shortcut keys
Global All Build Ctrl+b
Source
scope function Shortcut keys
Java Editor Formatting ctrl+shift+f
Java Editor Uncomment ctrl+\
Java Editor Comment ctrl+/
Java Editor Add import ctrl+shift+m
Java Editor Organization import Ctrl+shift+o
The Java Editor uses try/catch blocks to surround the settings, which are too common, so it is recommended to set them up here. You can also use ctrl+1 to automatically fix it.
Run
scope function Shortcut keys
Global single-Step return F7
Global single-Step skip F6
Global single-step jump into F5
Global single-Step jump selection Ctrl+f5
Global Debug Last started F11
Global Continue F8
Global use filters to step SHIFT+F5
Global Add/Remove breakpoints Ctrl+shift+b
Global Display Ctrl+d
Global Run last boot ctrl+f11
Global Run to row ctrl+r
Global Execution Ctrl+u Refactoring scope function shortcut keys
Global Undo Refactoring Alt+shift+z
Global Extraction Method Alt+shift+m
Global decimation local variable alt+shift+l
Global inline Alt+shift+i
Global Mobile Alt+shift+v
Global Rename Alt+shift+r
Global Redo Alt+shift+y
This article transferred from: http://www.cnblogs.com/decarl/archive/2012/05/15/2502084.html
Eclipse Editor Basic settings