Tips for MyEclipse/Eclipse

Source: Internet
Author: User
To sum up some tips in personal use of MyEclipse and Eclipse: Set the workspace code Liferay development environment we need to code the project as a UTF-8, the default code of newly installed Eclipse is GBK, change to Window à Preferences à General à Workspace, and select other, UTF-8 at Textfileencoding. Click

To sum up some tips in personal use of MyEclipse and Eclipse: Set the workspace code Liferay development environment we need to code the project as a UTF-8, the default code of newly installed Eclipse is GBK, change to Window à Preferences à General à Workspace, and select other, UTF-8 at the Text file encoding below. Click

Summarize some tips for using MyEclipse and Eclipse:

Set workspace Encoding

Liferay development environment we need to project code for UTF-8, the new installation of Eclipse default code for GBK, modify the way to Window à Preferences à General à Workspace, select other, UTF-8 at the following Text file encoding. Click OK to save.


Java code prompt

In MyEclipse or Eclipse, by default, only when we press ". when using visual studio, you can see that this IDE is automatically prompted when you press all the keys. In the past, you envy the power of visual studio, and one day you will find that, eclipse also has this function, but it is not enabled by default. The method for enabling is as follows:

Windows --> Preferences --> Java --> Editor --> Content Assist

Type in the input box after Auto activation triggers for Java (only one point is used by default):. abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLNMOPQRSTUVWXYZ

This means that the code is automatically prompted when we enter 26 English letters (uppercase and lowercase) and points.

The above Auto activation delay (MS) This is, After typing the delay is small milliseconds to start to prompt, the default is 200 milliseconds, You can fine-tune according to your own situation, generally keep the default.

Console buffer size

Why modify the console buffer size? Sometimes we start tomcat or use System on the console. when there are too many printed content such as out, the previous content will be overwritten. In this case, if you want to view the previous output information, you will not be able to see it, therefore, you need to modify the Console Buffer so that the console can display more content.

The method is as follows:

Windows --> Preferences --> Run/Debug --> console

On the right side: Console buffer size (characters), which is 80000 characters by default and can be adjusted as needed. I usually add 0 to 800000.

Common shortcut keys

Although there are many articles about MyEclipse and Eclipse shortcut keys, the following are some of the most commonly used shortcut keys in your own development.

Ctrl + Shift + R: You can view files by file name. The wildcard "*" is supported. When there are many files in the project, you can quickly search for files by file name.

Ctrl + T: If a class or method is abstract or interface, you can select this method and interface and press Ctrl + T to find its implementation or inheritance, this is useful when you view the source code that is not written by yourself.

Shift + Tab: The Tab key can indent the selected code, but sometimes shift + Tab can be used to reduce it.

Ctrl + D: delete a row, or select several lines of code. To delete a line of code, you only need to locate the line of water mark, press ctrl + D, if you want to delete multiple lines, select, press Ctrtl + D.

Ctrl + Shift + F: formatting code, which is very common.

Alt + ↑/↓: you can move the selected code line down or down. It is often used for code modification or refactoring.


There are some tips to refer to this link: http://www.huqiwen.com/2012/08/30/liferay-6-1-development-study-1/

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.