Eclipse has powerful editing features, 工欲善其事, its prerequisite, and the ability to master Eclipse shortcuts, which can greatly improve productivity.
Edit related shortcut keys
- Note Ctrl +/
- Quick fix Ctrl + 1
- Delete Current line Ctrl + D
- Formatting a document Ctrl + Shift + F
- Insert blank line Shift + Enter
- Edit window Maximize Ctrl + M
- Show outline Ctrl + O
View, locate shortcut keys
- Find Java class file Ctrl + Shift + T
- Find References Ctrl+shift+g
- Fallback history alt+←, alt+→
- Quickly find the selected content Ctrl+k
Refactoring shortcut keys
- Renaming Alt+shift+r
Comment ctrl+/
You can add comments or uncomment the cursor "row" or "Selected line". You can also add or uncomment multiple lines
Quick fix Ctrl + 1
Delete Current line Ctrl+d
The cursor is anywhere in the line, press Ctrl+d to delete the current row, and of course you can delete the empty row, not to delete the row, and press a lot of delete key
Formatting the entire document Ctrl+shift+f
Insert blank line Shift + Enter
Shift+enter inserts a blank row on the next line of the current row (at which point the mouse can be at any position in the current row, not necessarily the last)
Shift + Ctrl + Enter inserts a blank line on the previous line of the current row
Edit window Maximize Ctrl + M
Large screen increases productivity, Ctrl + M maximizes the editing window
Show Outline Ctrl + O
shows an outline of methods and properties in a class to quickly locate methods and properties of a class
Find Java class file Ctrl + Shift + T
Find a Java class file in the search workspace (Workspace) build path, and do not suffer for the class being found, and you can use "*", "? "And so on wildcard characters.
Find References Ctrl+shift+g
Find references to classes, methods, and properties. This is a very useful shortcut key, such as to modify the code that refers to a method, you can quickly locate all references to this method by using the "ctrl+shift+g" shortcut key.
Fallback history alt+←, alt+→
Backward history and forward history are useful in tracking code, and users may find several associated places, but they may not be able to remember the order in which they are located by these two shortcut keys.
Quickly find the selected content Ctrl+k
Ctrl + K quickly looks down the selection and no longer needs to click the Find dialog box with the mouse.
Ctrl + Shift + K quickly find the selected content
Renaming Alt+shift+r
Source: Here
Eclipse common shortcut keys (animated)