Eclipse Common Shortcuts and shortcut key conflict resolution __java

Source: Internet
Author: User

The so-called shortcut key is to be able to leave the mouse, with multiple key combinations to complete an action button, in the development of more convenient, improve efficiency, the use of shortcut keys is

One trick is not to master the more shortcuts that indicate the stronger the coding power, and not to force to remember all the shortcuts in the development tools and systems, and to master

Use a few on the line, here List Eclipse ten commonly used shortcuts, because people, not necessarily for everyone.

Shift+enter/shift+ctrl+enter 

A new blank line below or above the current line, which is usually very useful, especially when editing an XML configuration file, the general input label first half

Part, the closed tag will automatically close, when the cursor is right in the tag body, after adding the relevant content, the cursor will not stay at the end of the line, and then need

To start a new line, enter a different content, this time the shortcut is very good, otherwise you need the mouse or motion keys to the right until the end of the line, and then press the next

The car (enter) key, obviously wasted a little time.

ALT + UP ARROW key/ctrl+alt+ up and down direction key

ALT + UP ARROW is cut the selected code block, this is very convenient, in fact, is to select a block of code, cut, paste to the specified location, CTRL + C, and then

Move the cursor to the specified location, and then CTRL + V. Directly using the shortcut keys, reduce the key one at a time.

ctrl+alt+ up and down the key is to copy the selected code block, move the key to copy once, general and ALT + up and down direction key, in a class, many

When a method has the same code, you can consider the shortcut key.

Ctrl+shift+r/ctrl+shift+t

Quickly locate and open a file/class based on a filename

Ctrl+o

Quickly call outline, the class of more methods, and the code is more, one to find a special effort, through the rapid pull outline, can be very convenient

Locate a method.

Ctrl+shift+o

Removes unwanted imports (import) from Java class encoding.

Ctrl+shift+f

Format the encoding

Ctrl+d

Delete the current line, do not use shortcut keys, you need to select the current line, and then press the BACKSPACE key, using shortcut keys, very convenient.

F3/f4/ctrl+alt+h

These three keys actually work for the class and class methods:

Mouse positioning on the method click on Ctrl+alt+h, you can see the method by who called the

In turn, place the mouse on the method name, click F3, and then view the method declaration

Click F4 on the class to view the inheritance structure of the class

ALT + LEFT ARROW key

Code trace fallback, we often look at the definition of a method and then look at another method in the definition, so that when the trace is deeper, you go back to the

The original position, in addition to relying on memory, this shortcut key is very useful, can help us to return to the position just now.

Ctrl+alt+pageup/pagedown

When encoding tab to switch around, in the open multiple classes, a will this file, a will be that file, this time need to switch back and forth, this key is more useful,

It can be done without a mouse.

Shortcut key conflict Resolution:

Sometimes you press the shortcut key and do not perform an action, there may be a shortcut key conflict, the general eclipse in the lower right corner will appear the two conflicting keys

Or more options, let's choose which one to perform and the first action will be performed by default. The way to resolve this conflict is to reset the shortcuts and select win in turn

Dow->preferances->general->keys, and then locate the conflicting shortcut key select Unbind Command, and then bind the shortcut keys in turn (Bi

nding), binding, only need to click the mouse binding input box, and then hold down the shortcut you want, without input, eclipse will automatically perceive the loss

into, and fill in the input box, and finally click Apply,ok.

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.