Configure eclipse to automatically complete by pressing any key code

Source: Internet
Author: User

You don't need to mention the functions of eclipse. You know something about it when you use it. But have you noticed that there are always code prompts when others input code? Is it a bit depressing? Why can't I? Let's set our own as follows:

1. Open eclipse
2. Open the "option" dialog box (Windows-> preferences ...)
3. Open "Java-> Editor-> content assist" in sequence. In the "auto-activation" t option box, you can see
Auto activation delay: // indicates the automatic prompt time, which is usually about 40 (the default value is 200)
Auto activation triggers for Java: // indicates the trigger message by pressing a key (default .)
Auto activation triggers for javadoc

We need to set the preceding two items:

(1) set "auto activation delay" to around 40, which can be set based on the input speed of the individual;
(2) set the trigger, "auto activation triggers for Java" in the text box. Enter ABC (26 letters can be entered in eclipse, and only ABC can be entered in myeclipse );
(3) Click "OK" to confirm the settings. Now you only need to enter the settings when entering the code ". the four keys of ABC can trigger the prompt, but nothing else can be done. Don't worry. (Of course, in eclipse, We can enter 26 letters in step 2, we do not need to do the following work. below is the work for myeclipse which can only input 4 letters );
(4) In the "PACKA" window, right-click and choose "Export..." to go to the "Export" dialog box and select "General-> Preferences" to go to the "Export Preferences" dialog box;
(5) Don't ask anything else. Just enter the name of the path to the file to be exported in the "to preference file:" text box (you can click "Browse... "button input), remember the path and file name, we will use it later;
(6) Click "finish" to complete the export;
(7) use NotePad to open the file you just exported and find "/instance/org. eclipse. jdt. UI/content_cmd_autoactivation_triggers_java =. ABC "in. enter "defghijklmnopqrstuvwxyz" after ABC (the prompt is: Is the opened file a bit dizzy? You can click "edit-> Search" to find it ". ABC "Quick Find"/instance/org. eclipse. jdt. UI/content_cmd_autoactivation_triggers_java =. ABC ")
(8) Save the modified file and return to myeclipse again. We just exported the file. Now we want to import the exported file to myeclipse.
(9) Right-click "import..."-> "general"-> "Preferences"
(10) In "from preference file:", select the modified export file and click "finish" to complete the import.

Well, after the first 10 steps, our myeclipse can also have the high-speed input function as others do. Please try it.

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.