Improve eclipse usage efficiency (i)--use shortcut keys

Source: Internet
Author: User
Tags deprecated

Edit code Common shortcut keys

Shortcut keys for formatting code Ctrl + Shift + F

The shortcut key for formatting indents is Ctrl + I, which indents only the selected text

The shortcut key for deleting a row is Ctrl + D

Maximize current window to minimize toggle Ctrl + M

Go to the last modified position Ctrl + Q

Quick Find selected Characters Ctrl + K (down) Ctrl + Shift + K (UP)

Place the cursor in a parenthesis, switch to another pair of parentheses Ctrl + Shirt + P

Toggle Alt + Left and RIGHT arrow keys in edited position

Read the common shortcut keys for code

F3 does not explain (some people prefer to use CTRL + LEFT mouse button)

Check the method or variable Ctrl + Alt + H to find where to call, quickly read the code and evaluate the code changes that must be used

Inheritance relationship F4, understanding the framework of code

Quick Find functions and variables Ctrl + O, enter the name of a function or variable, much faster than one in outline, but be aware of the code

All works look for Ctrl + H, the code is huge in case of necessity.

Due to the limited level, the author only use these shortcut keys

If you want to know other shortcut keys Ctrl + Shift + L

Custom formatting code

Open the format of Java in preference

The built-in template can not be modified, click on New ..., just enter a name, create your own templates, play the definition edit window

Can be defined by a very rich project, on the right can also be previewed, even if the English is not cold, can also fathom the general meaning. The advantage of formatting the code is that it's not just beautiful, it's easy to read, and when it comes to team development, you can avoid a lot of conflicts when you merge code by using a uniform format. Modifying a completed template is when you format it with CTRL + Shift + F

Automatic removal of useless import, auto-complete @override and @deprecated,eclipse clean up

In the code style, in addition to the format

Do the same with format, create a new template, there are a few places I decided it was necessary to change

In the Code organizing tab, select the Remove trailing whitespace(remove trailing spaces)

and Organzie Imports

Select Organzie before Imports effect

Import org.model.*;

Select Organzie after Imports effect

Import Org.model.Engine;

Switch to the Code style tab

Using blocks in if/while/for/do statements to automatically add parentheses to the if/while/for/do , this varies from person to person, and I decide to add parentheses even if only one line is used.

By clicking Source-clean up in the menu, you can clean up the code, the biggest benefit of cleaning up the code is to remove the useless import, add @deprecated and @override automatically


In particular, the automatic addition of @override, it is clear to understand that those functions are inherited.

Code hints

Used the visual assistx of certain very system its code hint function, I am a person without code hint can not coding, click the menu windows-preference, switch to the following window

Locate the Auto Activation, which is the section in the red box, and turn auto Activation delay (ms): Modify to

Change Auto activation triggers for Java: Modify to . abcdefghigklmnoprstuvwxyzso that you can be prompted at any time.

Finally, we introduce two tools,search Everything quickly find files based on file name,clipx clipboard history.

Reference: http://www.cnblogs.com/sw926/p/3209615.html

Improve eclipse usage efficiency (i)--use shortcut keys

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.