MyEclipse Setting code hinting features

Source: Internet
Author: User

Why would you give us a hint when writing code? Do you know the tips are divided into manual tips and automatic prompts? Today, let's take myeclipse as an example. MyEclipse manual prompt and auto prompt how to set.


Before starting this blog, let's take a look at manual hints and automatic hints for the code. A manual prompt is a prompt that must be prompted by a shortcut key, and the prompt is automatically prompted as soon as you tap the code. Well, with such a premise, we will be lecturing.


Manual prompt:

MyEclipse is the manual code hint function, its default key is alt+/, but sometimes because of the MyEclipse shortcut key settings conflict, resulting in the shortcut keys can not be used. So change the shortcut key can be, such an article on the internet a lot of, simply say a bit. Open Myeclipse,window-preferences, in the search box on the left to enter the keys, select the search box on the right to enter the alt+/, choose Content Assist after the right to change the shortcut to the corresponding on it. Specific as shown. OK, manual tips not much to say, the following emphasis on the MyEclipse automatic prompt code function.


Auto Tip:

Before I looked at OA, I thought there was only one way to set the automatic hint, but after seeing Oa, I found that my understanding appeared to be biased, so I sorted out the following separately.


First, the code for the Java class automatically prompts for settings:

Open myeclipse,window-preferences, select Java-editor-content Assist on the left, as shown, and the "." is shown on the right. So only when the code is knocked out to be able to automatically prompt the code, we have to change is here. Change this to ". ABC". After the change, click OK, exit.

Then myeclipse inside, File-export


The following interface appears:

Select General-preferences, click Next button next

Select an output path, my output path is the desktop, named Aaa.eof, and then go to the corresponding path to find this file, open. Ctrl+f search ". ABC"

Change the following value ". abc" to ". ABCDEFGHIJKLMNOPQRSTUVWXYZ (,"

Then save and close the file. Click on the file--import inside the MyEclipse again

The following interface appears

Click the Next button to proceed to the next

Click the Finish button. This way the entire Setup myeclipse automatically prompts the code to complete the function. But note that this is also I read OA I know, the internet did not have a detailed explanation of this, the addition of MYECLIPSE automatic hint code function is for the Java class .


OK, now we say how to add the configuration file inside the automatic code hint function, this is also see the OA learned. To introduce this, the first thing to do is to extend something else. First look at the following code, I use the red line to annotate the content.

I don't know if you're familiar with the part I marked with the red line. This is the description of the constraint file, our Struts2 configuration file does not automatically prompt information, that is, it can not find the constraint file, it just get this constraint file, you know where to write what should not be. All we have to do is add a constraint file to it.


First, the myeclipse inside the window-preferences, and then in the left side of the search box input XML, select the XML Catalog

Click the Add button to display the following screen

Click the file System button, go to your local find Struts2 file inside the STRUTS-2.1.7.DTD

Change the key type inside to a URI, copy the constraint file header that we need to find in the Struts2 configuration file http://struts.apache.org/dtds/struts-2.0.dtd to the text box of key, then click OK, This allows the entire configuration file configuration to automatically display the code to complete the function.


There should be a split line *************************************************** *****

Well, this blog is here today. A lot of knowledge is accumulated constantly accumulated, and slowly accumulate in order to achieve qualitative change from quantitative changes. This process is still very long, slowly accumulate it .....


MyEclipse Setting code hinting features

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.