Eclipse shortcut keys and eclipse shortcut keys

Source: Internet
Author: User

Eclipse shortcut keys and eclipse shortcut keys
Eclipse has powerful editing functions, master the Eclipse shortcut key function, and greatly improve development efficiency. Eclipse has the following shortcut keys related to editing. 1. [ALT +/] This shortcut is a good helper for users to edit and can help users with content. Do not worry about incomplete methods and attribute names, when you do not remember the names of classes, methods, and attributes, try the benefits of the [ALT +/] shortcut key.
2. [Ctrl + O] displays the class method and attribute outline, and can quickly locate class methods and attributes, which is very useful in searching for bugs.
3. [Ctrl +/] add a comment quickly to add or cancel a comment for the row where the cursor is located or the row selected. During debugging, you may always need to comment something or cancel the comment, now, you do not need to repeat comments on each line.
4. [Ctrl + D] Delete the current row, which is one of my favorites. You do not need to press the delete key multiple times to delete a row.
5. [Ctrl + M] The window is maximized and restored. When you perform operations in the window, you will always feel that the current window is small (especially when writing code). Now it is better, try the Ctrl + M shortcut.
View and locate shortcuts
In the program, it is not easy to quickly locate the location of the code and quickly locate the Bug. Eclipse provides powerful search functions, you can use the following shortcut keys to search for and locate data.
1. [Ctrl + K] and [Ctrl + Shift + K] to quickly go down and up to find the selected content. You no longer need to click the Search dialog box.
2. [Ctrl + Shift + T] Find the Java class file in the Workspace build path, and do not suffer from class failure. You can also use "*" and "?" .
3. [Ctrl + Shift + R] corresponds to [Ctrl + Shift + T] To find all files (including Java files) in the Workspace, or use wildcards.
4. [Ctrl + Shift + G] search for class, method, and attribute references. This is a very practical shortcut. For example, to modify the code that references a method, you can use the [Ctrl + Shift + G] shortcut to quickly locate all the positions that reference this method.
5. [Ctrl + Shift + O] quickly generate import. After copying a program from the Internet, you do not know how to import the program to the called class. Try the [Ctrl + Shift + O] shortcut key, there will be surprises.
6. [Ctrl + Shift + F] formatting Code. The Code with standardized writing format is a required course for every programmer. When you see a piece of code that is not pleasing to the eye, after selection, press the Ctrl + Shift + F shortcut to format the Code. If no code is selected, the current file (Java file) is formatted by default ).
7. [ALT + Shift + W] to find the path in the project where the current file is located, you can quickly locate the location of the browser view. If you want to find the package where a file is located, this shortcut is very useful (especially for large projects ).
8. [Ctrl + L] locates a line in the current editor, which is also valid for non-Java files.
9. [Alt + progress], [Alt + →] The backward and forward history records are very useful in tracking code. You may have found several associated areas, however, you may not be clear about the search. You can use these two shortcut keys to locate the search sequence.
10. [F3] Quickly locates a class, method, and attribute at the cursor position.
11. [F4] displays the inheritance relationship of the class and opens the class inheritance view.
Debugging shortcuts
Eclipse has the following shortcut keys related to running debugging.
1. [Ctrl + Shift + B]: Set a breakpoint or cancel a breakpoint in the current row. 2. [F11]: debug the program that was last executed. 3. [Ctrl + F11]: run the program that was last executed. 4. [F5]: trace the method. When the program executes a method, press [F5] to track the method. 5. [F6]: One-step execution program. 6. [F7]: After the method is executed, the last statement that calls this method is returned. 7. [F8]: continue to run until the next breakpoint or program ends.
Common editor shortcuts
Generally, the text editor provides editing-related shortcut keys, which can be used in Eclipse to edit text. 1. [Ctrl + C]: Copy. 2. [Ctrl + X]: cut. 3. [Ctrl + V]: paste. 4. Ctrl + S: Save the file. 5. [Ctrl + Z]: Undo. 6. [Ctrl + Y]: repeated. 7. [Ctrl + F]: search.
Other shortcuts
There are still many shortcut keys in Eclipse that cannot be listed one by one. You can find their usage methods through the help documentation. There are also several common shortcut keys as follows. 1. [Ctrl + F6]: switch to the next editor. 2. [Ctrl + Shift + F6]: switch to the previous editor. 3. [Ctrl + F7]: switch to the next view. 4. [Ctrl + Shift + F7]: switch to the previous view. 5. [Ctrl + F8]: switch to the next perspective. 6. [Ctrl + Shift + F8]: switch to the previous perspective.
There are many shortcut keys in Eclipse. You can find all the shortcut keys in the help document, but it is impossible to master the use of all the shortcut keys, and it is not necessary, if you take some time to get familiar with the shortcut keys listed in this section, you will get twice the result with half the effort.
Which shortcut key does eclipse automatically sort messy code?

Format: CTRL + SHIFT + F
Set the import package order in the defined format: CTRL + SHIFT + O

My eclipse shortcut

Ctrl + 1 quick fix (the most classic shortcut, you don't need to talk about it)
Ctrl + D: Delete the current row

Ctrl + Alt + ↓ copy the current row to the next row (copy added)
Ctrl + Alt + ↓ copy the current row to the previous row (copy added)

Alt + ↓ interaction position between the current row and the following row (especially practical, you can save cutting and pasting)
Alt + ↑ interaction between the current row and the previous row (same as above)
Alt + ↓ previous edited page
Alt + → next edited page (of course for the above)

Alt + Enter display the properties of the currently selected resource (project, or file)

Shift + Enter insert empty rows in the next row of the current row (the mouse can be at any position of the current row, not necessarily the last row)
Shift + Ctrl + Enter insert blank lines in the current line (same principle)

Ctrl + Q locate the Last edited location
Ctrl + L locate in a line (for those with more than 100 programs, there will be good news)
Ctrl + M maximize the current Edit or View (then press it, and vice versa)
Ctrl +/comment out the current row, and then press it to cancel the comment
Ctrl + O quick OutLine display
Ctrl + T quickly display the inheritance structure of the current class
Ctrl + W disable the current Editer
Ctrl + K quickly locate to the next one by referencing the selected Word
Ctrl + E: Click it to quickly display the drop-down list of the current Editer (if the current page is not displayed, it is displayed in bold)

Ctrl +/(keypad) collapse all code in the current class

Ctrl + × (keypad) show all the code in the current class

Ctrl + Space Code assistant inserts some code (but it is usually in conflict with the input method. You can modify the key of the input method or replace it with Alt +/for the moment)

Ctrl + Shift + E display the managers that manage all Opened Views (you can choose to close or activate them)

Ctrl + J forward incremental search (after pressing Ctrl + J, each letter editor you enter provides a quick match to locate a word. If not, it is not found in stutes line)

Ctrl + Shift + J reverse incremental search (the same as the previous one, but only from the back to the front)

Ctrl + Shift + F4 close all open Editer

Ctrl + Shift + X convert all selected text to uppercase

Ctrl + Shift + Y change all selected text to lowercase

Ctrl + Shift + F format the current Code

Ctrl + Shift + P locate the matched character (for example, {}) (when positioning from the front, the cursor must be inside the matched character, followed by the front, and vice versa)

Ctrl + Shift + R find files

Ctrl + Shift + T Search Class

Alt + Shift + R Rename (one of my favorite ones, especially the Rename of variables and classes, which saves a lot of labor compared with manual methods)

Alt + Shift + M extraction method (this is one of the most common methods in refactoring, especially useful for a lot of mud code)

Alt + Shift + C modify the function structure (more practical. N functions call this method and modify it once)

Alt + Shift + L extract local variables (you can directly extract some magic numbers and strings into one variable, especially when multiple calls are performed)

Alt + Shift + F convert the local variable in the Class into the field variable

Alt + Shift + I merge Variables
Alt + Shift + V move functions and variables
Alt + Shift + Z restructured regret medicine (Undo)

//////////////////////////
Edit... 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.