Java and XML Code prompting functions of myeclipse and eclipse

Source: Internet
Author: User

If the prompt function is unavailable for Eclipse, set it as follows:

Window-> preferences-> JAVA-> Editor-> contentassist-> advanced
Select the proposal kinds contained in the 'default' content assist list: in the preceding tab, check the other Java proposals option.

If you want to input other letters to achieve the effect after the Input Point, read the following article:

How can I set the code prompt function of myeclipse to be the same as that of Microsoft Visual Studio:

By default, the Code prompting function of eclipse and myeclipse is much worse than that of Microsoft Visual Studio.

, Mainly eclipse. myeclipse has many options that are disabled by default. You need to manually configure them by yourself. If the developer does not

If it is clear, I don't know about eclipse. The code prompt function of myeclipse is the same as that of Microsoft Visual Studio.

As powerful as the display function.

First, let's give a simple example to illustrate the problem. For example, in eclipse and myeclipse Code, set a foreach and switch.

You cannot get the code prompts (if you don't believe it, you can try it yourself), not to mention others, but in Microsoft Visual Studio

It prompts very friendly code. In fact, the code prompt function in eclipse and myeclipse code is normal by default.

Click ".". Generally, a code prompt is displayed only when "." is clicked.

Principle: The "Auto activation triggers for Java" option refers to the option that triggers the code prompt.

Change ". abcdefghijklmnopqrstuvwxyz (," to indicate that 26 letters and. are encountered. (These symbols trigger code

Function. (You can rest assured that it is OK if you have set it here. You don't have to look at it. If you want to know more about it, read it slowly)

Enhance the code prompt function of eclipse and myeclipse. How can I configure it? The following describes the procedure (note that

Myeclipse 6.0.1 ):

1. Open myeclipse 6.0.1, and then "window" → "Preferences"

2. Select "Java", expand, "Editor", and select "content assist ".

3. Select "content assist" and then see "Auto" under "auto-activation" on the right.

Activation triggers for Java "option. In fact, it refers to the "." symbol that triggers the code prompt.

4. The "Auto activation triggers for Java" option should be followed by an ABC letter after "." To facilitate subsequent search

Modify. Then, "Apply" and click "OK ".

5. Then, select "file"> "Export", select "perferences" in the pop-up window, and click "Next ".

6. Select the export file path, export it to the desktop, enter "test" as the file name, and click "save ".

7. Find the file "test. EPF" you just saved on the desktop, right-click and choose "open with Notepad ".

8. You can see a lot of information about configuring myeclipse 6.0.1.

9. Press the "Ctrl + F" shortcut key, enter ". ABC", and click "find next ".

10. Find the configuration information of ". ABC" as follows:

As follows:

11. Change ". ABC" to ". abcdefghijklmnopqrstuvwxyz (,". Save and disable "test. EPF ".

12. Go back to the myeclipse 6.0.1 interface, "file" → "import", select "perferences" in the pop-up window, and click

"Next": select the modified "test. EPF" file, click "open", and click "finish ". This step and above

The export procedure is similar.

13. Finally, of course, the code is tested. Create a project and a class. Enter switch and foreach in the code.

Test. You will immediately find that there are prompts, and there will be a lot of related prompts no matter which letter you typed, very smooth, very good

.

Summary:

The "Auto activation triggers for Java" option refers to the option that triggers code prompts and changes "."

". Abcdefghijklmnopqrstuvwxyz (," refers to the occurrence of 26 letters and. (These symbols trigger code prompts

Yes.

By the way, modify the class name and interface name highlighted in different colors. You can configure it in "Java"> "enditor">

"Syntac", expand "Java"> "classes" on the right side, check the "enable" option, and select your preferred color.

Of course there are other related color configurations. Not to mention it. In fact, there are many configurable preferences.

Things, so that myeclipse is optimized. Specifically, individual needs to configure according to their personal preferences.

 

2011-10-28 added the following XML code prompt:

Set the code prompt function for the XML file

Open eclipse and choose Window> preferences>XML> Editor> Content assist> auto Activation>Prompt when these characters are inserted, The default value is <= :,

Change it:

 

Reference content is as follows:<=:. AbcdefghijklmnopqrstuvwxYZ (,

Of course, you can also use Alt +/to prompt

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.