Eclipse optimization (partial), eclipse optimization (
1. enhanced the input code prompt function of Eclipse (MyEclipse ).
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.
When setting the prompt for editing each file, it is window à Preferences and then searches for content Assist.
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!
Source: http://www.cnblogs.com/decarl/archive/2012/05/15/2502084.html
Reference: http://blog.csdn.net/hztianye/article/details/14898951