The input variable in eclipse automatically complements the upper-screen workaround

Source: Internet
Author: User

I myself started the Eclipse code completion after the input feel really much better, but each time the input variable after a press space, the compiler will help you write a very painful name, such as you input: String MSTR After the space, it becomes mstring, very annoying. The following is a formal solution, but after I repeatedly toss, I really can not put the source code to display the plug-in project. So I stole a lazy to download the modified jar package on the Internet, successfully completed.

The directory where I copied the jar package myself is: D:\Work appliactions\adt-bundle-windows-x86-20140702\eclipse\plugins

The following gives a kind person's resources, I see other people's resources should be 10 points, the Good man will be 1 points meaning, really thank ~

Resource address:http://download.csdn.net/download/danieldaniel/5993817

This article transferred from: Http://blog.163.com/[email protected]/blog/static/17137008620137284213531/

Detailed illustration reference: http://www.blogjava.net/greatyuqing/archive/2012/11/29/392226.html

eclipse is a very powerful IDE, his auto-completion function and VS have a fight, but in some cases, its auto-completion is too self-assertion, such as the following:
        to create a new string of variable value, Eclipse will list valuestring in the candidate list when entering value, and if you enter a space at this time, The valuestring in the candidate list will be selected, then the new variable will become valuestring, which will be a very painful thing to do.
       for long-term programming people absolutely can't stand this kind of torture. Thus, the solution come out:
      First, open Eclipse, open window- >show view, select Plug-ins, Find Org.eclipse.jface.text, right-click, select Import as-> Source Project, after import is complete, You can see this project in your workspace.
      Then, under the Import project, the org.eclipse.jface.text.contentassist.completionproposalpopup# Verifykey () "function has a section of code :  (ctrl+f search)

If (contains(triggers, key)) {

...

}

Change this code to

If (key! =0x20 && key!= ' = ' && key! = '; ' && contains(triggers, key)) {

...

}

And the code on top of this piece of code.

Case ' \ t ':
E. doit= false;
Fproposalshell. SetFocus();
Return false;

Revision changed to

case ' \ t ' :
    e. Doit= false     insertselectedproposalwithmask (e statemask
break

After the above operation, this auxiliary input plug-in has ruled out the space and the "=" check function, added the TAB key check function. 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 catalog where you want to save the plugin, and then finish. You will then create a new plugins directory in your chosen directory with a jar file that replaces the org.eclipse.jface.text_3.6.1.r361_ inside the eclipse/plugins. V20100825-0800.jar (this file is different version of Eclipse, the later version number will not be the same, I use Eclipse 3.6), so it's done!

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.