Routine eclipse operations to improve speed and code Quality

Source: Internet
Author: User

1. Smart tip:

Step: Windows → preferences → Java → editor → content assist

We can see that the default value of autoactivation delay is 200 (unit: milliseconds). That is to say, the smart sensing prompt is displayed only after "." is played. So what if I change it to 20? Try it. After it is changed to 20, the system prompts a significant increase in speed, which can keep pace with the times ...... :)

OK. The last modified prompt time. Modify the trigger that triggers Intelligent Sensing this time. That is to say, make it a powerful sensing function like our visual studio2008, that is, input s to prompt all the functions such as the keyword starting with S. It is easy to set the value of auto activation triggers for Java, and change the original trigger "." To "." + 26 × 2 letters. Hmm? Why is it 26 × 2? Because the letters are case-sensitive, 26 in upper case and 26 in lower case. Of course 26 × 2 is the case!

The procedure is as follows:

Go to: Windows → preferences → Java → editor → content assist

Then modify the default value "." of auto activation triggers for Java to ". ABC ". Next, file → export → preferences → export to a certain file (assumed as test. and open test. EPF, search ". ABC "and then change it ". abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvw ", save.

Then file → import → preferences → test. EPF, OK, and write JavaProgram. A smart prompt will appear.

2. Set the font and size:

Window-> preferences-> General-> appearance-> colors and fonts, open basic, double-click Text font note:Default font: Courier NewDefault size: 10Note that the description with @ in front of the font is incorrect...

3. Set the encoding:
1. Windows-> preferences... open the "Preferences" dialog box, left navigation tree, navigate to general-> workspace, right text file encoding, select other, change to UTF-8, text file encoding in its properties dialog box is the UTF-8.
2. Windows-> preferences... open the "Preferences" dialog box, navigate to General> content types in the left navigation tree, select context types on the right, open text, and select Java source file, enter the UTF-8 in the following default encoding input box, and click Update to set the Java file encoding to UTF-8. Other Java application development-related files
Such as properties and XML Eclipse By default, ISO8859-1, where you can specify a UTF-8 where you do need to change the encoding format in development.
3. After the above two steps, the new Java file is UTF-8 encoding, Eclipse Compile and run
Line and debugging are okay, but there is always an error when outputting the product of the RCP application, or when outputting the plug-in, or the compilation fails (compile should be re-compiled during output) or garbled Chinese characters are displayed when the output plug-in is running. Now you need to add a line in the build. Properties of the RCP application, or plug-in Plug-in project, javacdefaultencoding .. = UTF-8. Let the output compile know the UTF-8 encoding for the Java source file. This setting needs to ensure that all Java source files are UTF-8 encoding format, if not all, you can refer Eclipse Plug-in
Development Environment guide> reference> feature and plug-in build configuration), we recommend that all Java source files be UTF-8 encoded.

If the plug-in development, RCP application development based on other encoding, such as gb18030, want to convert to UTF-8, first, do the above work; then through the search encoding conversion tool, for example, based on the iconv batch conversion tool, convert the original encoding to UTF-8 encoding, note that only the conversion of Java source files, other types of files may already be more appropriate encoding; change text file encoding from the original project property to the UTF-8.

About encoding can be linked to: http://blog.csdn.net/jianw2007/article/details/3930915

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.