ArticleDirectory
- 8.1 General settings
- 10.1. project code
Eclipse editor Basic settings
1. Add a row number
Right-click the edge
2. Change the font
General font configuration
3. check spelling errors
4. Java Code Style
Code formatting
CTRL + Shift + F
Click the new button on the right to create a new style.
Click OK
Braces curly braces selected
Then, when editing other styles, click the edit button in the previous menu.
5. Content auxiliary settings
6. Add, select, and compile JDK settings
Add JDK
Click Add on the right
Compilation settings
7. Modify smart prompt options
Indicates hitting. And entering @ will prompt
Configure the shortcut key content assist
Settings below
8. Enhanced eclipse (myeclipse) input code prompt function 8.1, general settings
(1) Open eclipse and select "window -- Preferences ".
(2) Select "Java -- editor -- content assist" in the directory tree, and find the "auto activation triggers for Java" option on the right side of "auto-activation. The "." symbol is triggered by default.
(3). In the "auto activation triggers for Java" option, add the ABC letter after. Then "Apply" and click "OK ".
(4) Select "file -- export", select "General -- perferences" in the pop-up window, and click "Next ".
(5) Select "export all", specify the Save path, and click "finish" to generate the "*. EPF" file.
(6 ). edit "*. EPF "file: Search ". ABC ", and then put ". ABC "changed :. abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz (, @, and then save "*. EPF file.
(7) Select "file -- import", select "General -- perferences" in the pop-up window, and click "Next ".
(8) Select the "*. EPF" file, select "import all", and click "finish" to complete the operation.
At this time, eclipse can trigger code prompts Based on the edited English letters (uppercase or lowercase) and carry the input, which is convenient and convenient.
Window is used to set the prompt for editing each file.ÀPreferences and then search for content assist
However, it is slightly different when you set an editor.
Take Java and XML as an Example
Java
XML
8.2. Questions about modifying spaces and "=" automatic screen Loading
Previously, I only knew Alt +/to call up assist. Later I found that content assist can be activated for all letters (written in 8.1 ). It is really nice to use, but some default settings in eclipse are not very good. For example, the Space key and the = sign will automatically display the content of the first line, in fact, many times I just want to enter a space or a = sign. This cannot be set in the settings. Fortunately, eclipse has a plug-in mechanism. You can modify the plug-in source code, export it as a plug-in, and replace the original plug-in for processing.
1. First find the relevant plug-in
Open plug-ins view and find the plug-in org. Eclipse. jface. Text. Right-click and choose import as source project. After the import is complete, you can see the project in your workspace.
2. modify the code
In the src/org/Eclipse/jface/text/contentassist/completionproposalpopup. Java file, find the line of code
Char [] triggers = T. gettriggercharacter ();
If (contains (triggers, key ))
In the line if judgment, eclipse will determine whether the key (that is, the key you press) is in triggers. If so, it will trigger the code of the first line prompting the screen, so what we need to do is to exclude space and =:
If (key! = '& Key! = 0x20 & contains (triggers, key ))
3. Export the modified org. Eclipse. jface. Text.
Right-click Org. eclipse. jface. text, select export --> deployable plugins and fragments, next, destination select archive file, and then finish. you can see the generated jar in the ZIP file and use it to replace the jar package with the same name in Eclipse/plugins.
If (key! = 0x20 & Key! = '& Key! = ';' & Contains (triggers, key ))
Finally, export the modified plug-in. Right-click the project in your workspace, select export-> deployable plugins and fragments, click Next, select the destination tab, and select directory, select a directory to save the plug-in, and then finish. Then a new plugins directory will be generated under the directory you selected, which contains a jar file that replaces org in Eclipse/plugins. eclipse. jface. text_3.6.1.r361_v20100825-0800.jar (this file different versions of eclipse, the later version will be different, I use eclipse 3.6), so it is done!
9. Import JUnit
Right-click the project and select build path.ÀAdd Libraries
10. modify code 10.1 and project code
Right-click the project and choose porperties
Select resource select UTF-8
10.2. encoding-related settings in myeclipse8.0
10.2.1,Window-> preferences-> General-> editors-> text editors-> spelling
The settings here are generally related to the text displayed in the editor of the Code. garbled characters may occur when the settings are incorrect.
Then manually enterGb18030
10.2.2,SetRun ConfigurationAndDebug Configuration
Http://www.cnblogs.com/decarl/archive/2012/01/02/2310017.html
11. Shortcut Keys
(1) Ctrl + Space
Description: Content assistant. Provides prompts for methods, variables, parameters, and javadoc, which should be used in various scenarios. In short, you can press this shortcut key when prompted. Note: do not conflict with the input method switching settings.
(2) Ctrl + Shift + Space
Note: Variable prompt
(3) Ctrl +/
Note: Add/Remove // comment. In eclipse2.0, the Comment for elimination is Ctrl + \
(4) Ctrl + Shift +/
Note: Add/**/comment
(5) Ctrl + Shift + \
Note: delete/**/comment
(6) Ctrl + Shift + F
Note: The code is automatically formatted.
(7) Ctrl + 1
Description: Batch ModificationSource codeThe variable name in the Catch Block.
(8) ctril + F6
Note: interface switching
(9) ctril + Shift + m
Note: Find the desired package
(10) ctril + Shift + O
Note: The required package is automatically introduced.
(11) CTRL + ALT + S
Note: Quick menu for source code. Generate getters and setters and surround with try/catchblock are commonly used. We recommend that you add them as shortcut keys. The shortcut keys are set on Windows> preferences> workbench> keys.
2. Shortcut Key List
Edit
Shortcut for scope Function
Delete a row Ctrl + d
Globally search and replace Ctrl + F
Search for the previous Ctrl + Shift + K in the text editor
Search for the Next Ctrl + K in the text editor
Globally undo Ctrl + z
Global copy Ctrl + c
Select Alt + Shift + continue for global recovery.
Globally cut Ctrl + x
Global quick correction ctrl1 + 1
Global content assist Alt +/
Globally select Ctrl +
Delete globally
Global context information Alt +? Alt + Shift +? CTRL + Shift + Space
Java editor display tooltip description F2
Java editor selects the encapsulation element Alt + Shift + Transform
Java editor selects the previous element Alt + Shift + ↓
Select the next element Alt + Shift + →
Text Editor incremental search Ctrl + J
Text Editor incremental reverse lookup Ctrl + Shift + J
Globally paste Ctrl + V
Global redo Ctrl + Y
View
Shortcut for scope Function
Zoom in globally Ctrl + =
CTRL +-
Window
Shortcut for scope Function
Global activation editor F12
Global switch editor Ctrl + Shift + W
Global editor Ctrl + Shift + F6
Global View Ctrl + Shift + F7
Global Perspective Ctrl + Shift + F8
The next global editor Ctrl + F6
Next Global View Ctrl + F7
CTRL + F8
Text Editor display ruler context menu Ctrl + W
Global View menu Ctrl + F10
Global display of System Menu Alt +-
Navigation
Shortcut for scope Function
Open the structure Ctrl + F3 in the Java editor.
Global Open type ctrl + Shift + T
Global Open Type hierarchy F4
Global open declaration F3
Open external javadoc SHIFT + F2 globally
Globally open resource Ctrl + Shift + R
Global rollback history Alt + rollback
Global forward history Alt + →
CTRL +,
CTRL +.
Java editor display outline Ctrl + O
Globally open the type ctrl + Shift + H in the hierarchy
Globally move to matching parentheses Ctrl + Shift + P
Go global to the previous editing location Ctrl + q
Go to the previous Member Ctrl + Shift + ← in the Java editor.
Go to the next member in the Java editor Ctrl + Shift + ←
Text Editor to Ctrl + L
Search
Shortcut for scope Function
Globally displayed in the file Ctrl + Shift + u
Global Search dialog box Ctrl + H
Declare Ctrl + G in the global Workspace
Reference Ctrl + Shift + G in the global Workspace
Text editing
Shortcut for scope Function
Text Editor rewrite switch insert
CTRL + ← on the text editor
CTRL + ←
File
Shortcut for scope Function
Save Ctrl + x Ctrl + S globally
Print Ctrl + P globally
Globally Disable Ctrl + F4
Globally save Ctrl + Shift + S
Globally Disable Ctrl + Shift + F4
Global attribute Alt + enter
Globally create Ctrl + n
Project
Shortcut for scope Function
Global build Ctrl + B
Source code
Shortcut for scope Function
Java editor format Ctrl + Shift + F
Java editor uncomment Ctrl + \
Java editor comment Ctrl +/
Add and import Ctrl + Shift + M to the Java Editor
Java editor organization import Ctrl + Shift + O
The Java editor uses try/catch blocks to enclose unset ones, which is too common. Therefore, we recommend that you set them here. You can also use Ctrl + 1 for automatic correction.
Run
Shortcut for scope Function
F7 is returned in one global step.
Skip F6 in one global step
Global One-Step Jump to F5
Global One-Step Jump-in and select Ctrl + F5
Global debugging last started F11
Continue F8 globally
Shift + F5 in one step using filters globally
Globally Add/remove breakpoints Ctrl + Shift + B
Global display Ctrl + d
Global run last started Ctrl + F11
Run Ctrl + R globally
Globally execute Ctrl + u refactoring scope function shortcut key
Global undo reconstruction Alt + Shift + z
Global extraction method Alt + Shift + m
Global extraction of local variables Alt + Shift + L
Global inline Alt + Shift + I
Move Alt + Shift + V globally
Globally rename Alt + Shift + R
Global redo Alt + Shift + Y