Eclipse code editing shortcut, eclipse code shortcut
Code prompt (Code Assistant): alt +/
If you press alt +/after entering e, related methods starting with e will appear. When writing code, you often press
Delete a line of code: move the cursor to any position of the line, press ctrl + d
Cut: ctrl + x
Copy: ctrl + c
Paste: ctrl + v
Undo: ctrl + z
Redo: ctrl + y
Use of code generators
Source menu: shift + alt + s
Automatic Generation of constructors: Generate Constructor using Fields...
The toString () method is automatically generated: Generate toString ()...
The hashCode () and equals () methods are automatically generated: Generate hashCode () and equals ()...
Single line comment: select the code, press ctrl +/to add a comment, and then press Cancel comment.
Multi-line comment: shift + ctrl +/, cancel pressing shift + ctrl + \
Ctrl + Alt + ←: copy the code of the row where the cursor is located up
Ctrl + Alt + ←: copy the code of the row where the cursor is located downward