Common Eclipse settings, eclipse

Source: Internet
Author: User

Common Eclipse settings, eclipse

I. background color settings:

1. Click Window-Preference-General-Test Editors in sequence, and the Test Editors panel appears on the right. The Panel has the following option: Appearance color options, which is the setting of various plate colors, one of the items is background color (background color setting)

2. select background color, remove System Default, and click the color block to display the color Selection Panel.

3. Click custom color, set the color to 84, saturation to 91, brightness to 205, red to 204, green to 232, and blue to 207. Click OK, you can complete the background color settings.

You can set the Eclipse background color to protect your eyes.

Ii. java file size settings

1. Choose Window-Preference-General-Appearance-Colors and Fonts-Java Editor Text Font.

2. Click the Edit button on the right to set the java file size.

Iii. jsp and xml file size settings

1. Choose Window-preferences-General-Appearance-Colors and Fonts-Basic-Text Font.

2. Click the Edit button on the right to set the size of jsp and xml files.

 


Please tell me some common Eclipse operations

Ctrl + Shift + G search for references in workspace
Ctrl + Shift + R open resources
Ctrl + Shift + T Search Class
Ctrl + Shift + U search select selected text, which is very similar to the UE list Query
Ctrl + Shift + X capital all selected text
Ctrl + Shift + Y change all selected text to lowercase

Ctrl +, previous
Ctrl +. Next

Alt + shift + s directly bring up the source menu (rewrite the getset method and other operations)
Alt + shift + T the refactor reconstruction menu is displayed.
Alt + Shift + V moving functions and variables (not commonly used)
Alt + Shift + Z restructured regret medicine (Undo)

Try

What are some common functions of eclipse ??

Many people have said that after using eclipse, they have abandoned other java ides, indicating that it must be nice.
Let me introduce how to develop java using eclipse.

[Java Development Tool (JDT) features]

In fact, there are many features. Based on my development experience, I will introduce the outstanding features of jdt.

1. Automatically modifycode
To a large extent, this function automates the trivial work in some development code at ordinary times.

Open menu
+ Source
-Comment: This is useful. For example, if you write java code and find that you have a piece of code to note
Release the code, select the code, and then select the code. Then, the code will be automatically commented out.

Jian is "Ctrl + /"

-Uncomment: Uncomment. the operation method is similar to that of Comment. The shortcut key is "Ctrl + \"

-Format: I have always recommended this operation item, which is very convenient. For example, if you write a cell
Bad code, messy, then you choose this one, you will find, wow ~~, My code

You can try it if you don't believe it. The shortcut key is "Ctrl + Shift + F", so now I have started to learn
I am used to writing code for a while, just like c + s + f. It's very convenient.

-Sort Member: This is not very common, but if you think the code is too long, you can't find a letter.
Number, you can also try it. It will help you sort the functions and variables you have written.

-Organize Import: this function is not uncomfortable. For example, if you compile a project,
It is found that many imports are not used, or you reference a class, but you do not have import,

It doesn't matter if the result is not compiled. Once this is used, all the problems can be solved. At least after I use this
I have never written such statements as import. The shortcut key is "Ctrl + Shift + O (it is the letter O, not the number

0) ", I often use this with c + s + f.

-Override/Implement Method: for example, if you write a class to Implement an interface
If you have not implemented the function of that interface, use this function to automatically search for the parent class and Interface

Method, you can choose whether to overwrite or implement which functions

-Generate Getter and Setter: if you add a class variable, write getter and se for it.
Tter, it doesn't need to be so troublesome. It's all automatic.

-Generate Delegating Method: If a field needs to Generate a proxy function,
Click OK.

-Add Javadoc Comment: Specifies a function, class, or variable that you want to Add javadoc.
Select this option. It will automatically add the javadoc header, including the param or return

-Surround with try/catch block: for example, if you have a piece of code to handle some exceptions,
But you forgot to use try/catch to write it again. Don't worry. Select the code and select this one. You will find that it will

Automatically tests the exceptions in your code and generates all the code.

-Externalize string: This is used for internationalization. Simply put, the string
Package is in resource bundle, which is also a solution of i18n.

Introduce this.

2. refactoring:
Refactoring has been very popular over the past two years. Let's see how strong the Refactoring is in jdt.
Cited me... the remaining full text>

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.