Eclipse shortcut Summary

Source: Internet
Author: User

Eclipse is an essential tool in java. I have summarized its shortcut keys, I will not elaborate on the commonly used ctrl + Click, ctrl + shift + F, Ctrl + 1, etc., mainly for convenient viewing.
Most common and practical
1. Alt +/
As a content-assisted prompt, it is estimated that no one needs to use it. Of course, it can also be used for some quick input, such as the most used System for beginners. out. println (), as long as you enter syso and then press this key combination, the system automatically completes and positions the cursor in brackets. In fact, some common structures can be entered using this method, such as, try... Catch and so on, as long as it is defined in preference-java-editor-template, it can be used in this way.
2. Ctrl + Shift + O
Quickly and automatically import required packages.
3. Ctrl + D
Delete the current row or select a row.
4. Ctrl +/
Comment/uncomment the current line or selected line with a single line. Some code will inevitably be temporarily closed in the debugging program, so its usage is quite high. Shortcut Keys with similar functions include Ctrl + sift +/and Ctrl + sift + \. comment or cancel the selected part with multiple lines.
Not frequently used editing shortcuts
1. Ctrl + Shift + up/down
Copy the current row or select the row to the previous or next row.
2. Alt + up/down
Let the current line and the previous line/next line switch location, combined with the previous set of shortcuts you will find that copying and pasting code is very convenient.
3. Shift + Enter/Ctrl + Shift + Enter
Insert an empty row in the next/last line of the current row and move the cursor to the newly inserted row.
4. Ctrl + M
Maximize/cancel maximize the current window. It is very convenient to use it when the code is relatively long, so you don't have to switch the mouse to double-click it.
5. Alt + Shift + R
It is useful to modify the variable or method name of the current cursor and automatically modify all references.
Infrequent locate shortcuts
1. Ctrl + K/Ctrl + Shift + K
Quickly search for the selected content in the current document backward/forward. Although Ctrl + F is also acceptable, it is more convenient.
2. Alt + Left/Alt + right-click
Back/forward to the last code position. This group is convenient when you view the code, jump to several classes or methods consecutively, and want to go back to it.
3. Ctrl + Shift + T
Open Type. Open the class in JDK to view the source code.
4. Ctrl + Shift + G
You can check where the class, method, or attribute of the cursor is referenced. This is rarely used at present, because the code structure is very simple, but it will be useful in the future.
Uncommon technical shortcuts
1. Alt + Shift + S: Right-click the reconstruction menu and generate the getter/setter method, constructor method, and toString () method.
2. Alt + Shift + Z: Put the selected code in the while, for, try... In catch and other structures
3. Press Ctrl + F6/Ctrl + Shift + F6/Ctrl + E to switch to the previous/next editor or list the display card of the editor.
4. F3: Quickly locates the class, method, and attribute of the cursor.
5. F4 shows the inheritance relationship of the current class and opens the class inheritance view (or similar Ctrl + T quickly shows the inheritance relationship of the current class)
6. Press Ctrl + Q to locate the Last edited location.

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.