Eclipse Auto Tip + auto-complement

Source: Internet
Author: User
troubleshoot the code's automatic prompts:"Window" → "Preferences" select "Java", expand, "Editor", select "Content Assist". Select "Content Assist" and then see the option "Auto activation triggers for Java" under "Auto-activation" on the right side of the right. Actually, it means that the trigger code hint is "." This symbol. "Auto activation triggers for Java" option, in "." After adding abcdefghijklmnopqrstuvwxyz letters, easy to find the following changes. Then "Apply" and click "OK". Cancel "Space", "=" Automatically on screen:First find the relevant Plug-ins open plug-ins view Find Plug-ins Org.eclipse.jface.text, right click, select Import as Source Project, after the import is complete, You can see this project in your workspace. Some of the Eclipse Plug-ins export without source code, if you export a plug-in without source code, you need to download the Eclipse RCP version (which is convenient to modify the source code, can automatically import the source code), and then export to see the source code. Modify code in Src/org/eclipse/jface/text/contentassist/completionproposalpopup.java file, find one line of code
char triggers = T.gettriggercharacter (); if (contains (Triggers,key))

In that line of if judgment, Eclipse determines whether the key (that is, the button you pressed) is in the triggers, and if so, triggers the first line of code that prompts the screen. So what we're going to do is to exclude the blanks and = numbers:
if (key!= ' = ' &&key!=0x20&&contains (triggers,key))

Export the modified Org.eclipse.jface.text, right-click the Org.eclipse.jface.text in your workspace, and 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 jar package in Eclipse/plugins. automate the formatting and automatic management of import

In addition to performing these two functions manually, you can have eclipse automatically format the source code and automatically manage the import statement when saving the file. To do this, in Eclipse, go to Window-> Preferences-> Java-> Editor-> Save actions and enable perform the selected actions on S Ave, select Format Source code and organize imports.

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.