#这种方法只适用于Eclipse Classic Version (this version comes with the plugin's source code)
In the process of using ECLISPE, feel that auto-completion does not work well, not the strong vs. Here are two ways to enhance auto-completion:
1. Add Eclipse's hint function
In eclipse, from Content Assist, preferences, Editor, Windows---------auto-activation, we can After adding the first subtitles we need to automatically prompt, such as "ABC", you can add all 26 letters in the case (. abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz_).
2. Modify the shortcut keys for auto-completion
(In Eclipse Luna, 4.4, no modifications are required.) Space does not automatically select the first item in the completion list)
First, open Eclipse, open window->show view, select Plug-ins, Find Org.eclipse.jface.text, right-click, select Import as-> Source Project, After the import is complete, you can see this project in your workspace.
There is a section of code in the "Org.eclipse.jface.text.contentassist.completionproposalpopup#verifykey ()" Function under Import Engineering:
//Key! = 0Switch(key) {Case 0x1B://ESC e.doit=False; Hide ();Break;Case ' \ n '://Ctrl-enter on W2KCase ' \ R '://Enter e.doit=False; Insertselectedproposalwithmask (E.statemask);Break;Case ' \ t ': e.doit=False; Fproposalshell.setfocus ();return falsedefault: Icompletionproposal p= Getselectedproposal ( ); if (P instanceof icompletionproposalextension) {icompletionproposalextension t= ( Icompletionproposalextension) p; T.gettriggercharacters (); iffalse; Hide (); Insertproposal (P, key, E.statemask, Fcontentassistsubjectcontroladapter.getselectedrange (). x); } } }
Modify this code to:
//Key! = 0Switch(key) {Case 0x1B://ESC e.doit=False; Hide ();Break;Case ' \ n '://Ctrl-enter on W2KCase ' \ R '://Enter e.doit=False; Insertselectedproposalwithmask (E.statemask);Break;Case ' \ t ': e.doit=False;Insertselectedproposalwithmask (e.statemask); Break; default: Icompletionproposal p= Getselectedproposal (); if (P instanceof icompletionproposalextension) {icompletionproposalextension t= ( Icompletionproposalextension) p; T.gettriggercharacters (); if ( key!= ' = ' &&key!=0x20&&key!= '. ') &&key!= '; ' &&contains (triggers, key) {e.doit= False
This cancels the "=", the Space, "." and ";" Auto-completion, add tab to the auto-complete.
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 directory to save the plug-in, then finish, this will get a zip package, open, plugins will have a jar package, replace the Eclipse directory of plugins in the name of the file (preferably the original plugins directory under the Org.eclipse.jface.text_3.7.2.v20111213-1208.jar (because the Eclipse version differs from the name of this file may be different).
Using Eclipse after modification will be handy!
2012-10-01 20:49:38
Default Tab key function: In AutoComplete, open the explanation of the current line of the cue list.
_______________________________________________________________________
Note: MyEclipse cannot import the plug-in source project, can download the corresponding version of Eclipse, recompile the plug-in and then overwrite the MyEclipse plug-in can be.
Eclipse Auto-complete feature management