What are some common settings for Eclipse + personal preferences

Source: Internet
Author: User

1, the code automatically prompts

When we forget the method name or want to be lazy, the code automatically hints very useful. However, Eclipse defaults to enter "." Before a package or class member is prompted, it means that we must first enter a complete class name, prompt to come out, or press ALT +/each time. How can you make it appear whenever you enter a letter? Here you can set:
Content Assist---Activation, Editor, Java, Window

Delay is the delay time of the automatic popup box, we can change to 100 milliseconds, triggers here is "." By default, just add "abcdefghijklmnopqrstuvwxyz" or " ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ ", Hey! This will make it possible to enter each letter with the same character as the VS:

2, plug-in installation

Many textbooks say that Eclipse's plug-in installation is automatically retrieved via Help, install New software, but it's easy to operate, but when we don't need some kind of plugin it's not easy to find what to delete, And when the Eclipse version is upgraded, the plugins installed in this way will have to be re-loaded. Another way to address these issues is through link linking.
We take Eclipse's Chinese-language package plug-in as an example, first to the official Chinese package address download one: http://www.eclipse.org/babel/downloads.php, pay attention to choose your own version of Eclipse:

My version is Kepler, then go to the download page, click the link in the red box, you can download the Chinese package:

After downloading the extract, there will be an Eclipse folder that contains the features and plugin directories, and this eclipse is placed in our Eclipse installation root directory, which is the same level as the Eclipse.exe. Then still in this level directory, create a new links folder, and within that folder, build a language.link text file. The name of the text file can be taken, and the suffix is. Link, not the. txt yo. OK, the last step, edit the file, write the address of the language pack you just put in, and use "\" to indicate the path, must have path= this prefix.

After saving the file, re-open eclipse, the familiar Chinese interface finally see. Although the Chinese is not complete, but also enough is not it ... If it still appears in English, indicating that the Chinese failed to re-check the Language.link file in the configuration of the information is the same as the Chinese package directory.
Other plug-in installation method is also the case, when you do not need a plug-in, you just have to delete the directory and links directory of the corresponding link file, or change the path inside the link file into an invalid path; When you upgrade to eclipse in a high version, You just have to copy the old version of the plugin directory and the links directory to the past.

3. Basic settings

To set the font type and size of the code:
Assist, Colors and fornts, appearance, general------Preferences, Windows-----just modify Basic The Text Font on the face is ready.

4, set the text file and JSP file encoding

Text file Encoding, Workspace, General, Preferences, Window

Preferences, Web--JSP Files, Windows----Text file encoding-> Other:

5, set the JDK local Javadoc API path and source path  

When code hints are required, you may often encounter situations such as:

It also generates meaningless variable names, which can cause interference in the order of calls containing variable parameters of the same type;

This problem, we can avoid the source of the JDK or the corresponding jar package:

Installed JREs, Java--Preferences, Window--

Check the Set JRE directory, edit, and select all the jar packages under JRE system libraries, and click on the Source Attachment on the right;

Under External location, check the Src.zip file in the JDK installation directory to get down.

Set up, we look again, happiness comes suddenly there are wood!

6, set the servlet source code or other jar package source code

When we use non-JDK, such as Servlet's package or class, this thing comes out again, want to cry without tears of bright ...

The previous step has already set up the JDK source code or the Javadoc path, why now come out again? In fact, this is not difficult to understand, because we use the source of the class is not in the JDK source package.

Looking closely, we will find that these jars are actually in the Lib folder under the Tomcat root directory, but the Tomcat directory does not have a corresponding jar or zip file. Since there is no local, then go to the official web search:

http://tomcat.apache.org/download-70.cgi Here are Tomcat's installation packages and source packages;

You can customize a folder dedicated to storing Javasource and Javadoc, and place the download file in that directory.

Then switch to eclipse, select the class or function without code hints, press F3, click Change attached Source:

Choose the Tomcat source file we just downloaded, all the way OK.

Then go back and look at our code hints, which are much friendlier:

Other jar package source code is set up the same way.

7, HTML, JavaScript, JSP file code automatic prompt

2nd We talked about the code in the Java file automatically prompt, other types of files such as HTML, JavaScript, JSP if you can also provide hints that is not more cool? With the foundation of the 2nd setting, these settings are all the same. First look at JavaScript:

Content Assist-Auto-activation, javascript-> Editor, Window, Preferences

HTML:

Content Assist---Auto-activation, Editor, Web--HTML Files, Window, Preferences

After saving, we will enter to see, it feels really good:

Eight, anti-compilation plugin Jd-eclipse

Whether it is development or debugging, anti-compilation is necessary, each time with Jd-gui open to see, much trouble, simply configure the JD plug-in, automatic association. Class:

Download the offline installation package Jdeclipse_update_site.zip from http://jd.benow.ca/, unzip the features, Plugins 2 folders to the new folder Jdeclipse, and then The Jdeclipse folder is copied entirely to the Dropins folder in the Eclipse root directory, and you can restart eclipse. Is this way more convenient than building a link file?

Open Eclipse,Window--Preferences general-> Editors, associate the. class file with the editor of the JD plugin

What are some common settings for Eclipse + personal preferences

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.