Eclipse Variable Name Auto-complete problem custom on-screen key tab

Source: Internet
Author: User

Eclipse space equals sign can be on the screen, so sometimes the input variable name and then press the space will be automatically complete, very annoying. So what do we do?

1. First your eclipse needs to be equipped with Eclipse plug-in development environment and Eclipse JDT plug-in Developer Resources or go directly to download a version of your eclipse The same Eclipse sdk,:http://archive.eclipse.org/eclipse/downloads/

2. Open Eclipse (or your newly downloaded Eclipse SDK), click Window-show view-other, 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.
3. The Verifykey () function in "Org.eclipse.jface.text.contentassist.CompletionProposalPopup" under Import Works has a section of code:

 //Key! = 0  Switch(key) { Case0x1B://ESCe.doit=false;      Hide ();  Break;  Case' \ n '://Ctrl-enter on W2K     Case' \ R '://Entere.doit=false;      Insertselectedproposalwithmask (E.statemask);  Break;  Case' \ t ': E.doit=false;      Fproposalshell.setfocus (); return false; default: Icompletionproposal p=getselectedproposal (); if(pinstanceoficompletionproposalextension) {icompletionproposalextension T=(icompletionproposalextension) p; Char[] triggers=t.gettriggercharacters (); if(CONTAINS (triggers, key)) {E.doit=false;          Hide ();        Insertproposal (P, key, E.statemask, Fcontentassistsubjectcontroladapter.getselectedrange (). x); }    }  }  return true;

Change it to:

 //Key! = 0  Switch(key) { Case0x1B://ESCe.doit=false;  Case‘ ‘://space, semicolon, equals sign directly on the screen does not eject code hints     Case‘;‘:     Case=: Hide ();  Break;  Case' \ n '://Ctrl-enter on W2K     Case' \ R '://Enter     Case' \ t '://Tab key on screene.doit=false;      Insertselectedproposalwithmask (E.statemask);  Break; default: Icompletionproposal p=getselectedproposal (); if(pinstanceoficompletionproposalextension) {icompletionproposalextension T=(icompletionproposalextension) p; Char[] triggers=t.gettriggercharacters (); if(CONTAINS (triggers, key)) {E.doit=false;          Hide ();        Insertproposal (P, key, E.statemask, Fcontentassistsubjectcontroladapter.getselectedrange (). x); }    }  }  return true;}

4.

Export the modified plugin, right click on Org.eclipse.jface.text, select Export-> deployable Plugins and fragments, click Next, Directory in Destination, Select a directory where you want to save the plugin, and then Finish. A new plugins directory will be created in the directory you selected, with a jar file that replaces the Org.eclipse.jface.text_*.jar in the plugins that you used in the Eclipse directory, and the version number of each version is not the same , it's best to "-clean" the Eclipse after it's replaced.


Eclipse Variable Name Auto-complete problem custom on-screen key tab

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.