Common shortcut keys
Shortcut key configuration, common shortcut keys:
Content tip:
Alt +/
For example: System.out.println (); Statement, SYSO and then ALT and/will complete.
Forget how a class is written, write a section, hold down ALT, and/or you'll be prompted.
Quick FIX:
Ctrl + 1
For example, the program has a compile-time exception, or a guide package is required. Use this shortcut. There will be hints.
Guide Package:
Ctrl + SHIFT + O
If you need to import more packages, you can import them all at once, and also clean up the extra packets.
To format a code block:
Ctrl + Shift + F
Code Location Swap:
ALT + upper and lower keys
Add/Remove a single line comment
ctrl+/
Add/Remove Multiple lines of comment
ctrl+shift+/
Ctrl+shift+\
Reset Perspective: Window->reset Perspective
When the Java view of eclipse becomes messy, you can reset the perspective to revert to the original interface.
Uppercase and lowercase conversions
Change to uppercase Ctrl+shift+x
Change to lowercase ctrl+shift+y
Copy rows
Ctrl+alt+ down key
View Source code
1. CTRL + click the class to view the source code
2, Ctrl+shift+t
Delete:
1.Ctrl + D Delete when moving forward
The creation of a class
(method, constructor, encapsulation)
In the class, right-click Source. You can choose to create the Hashcode method, the Equals method, and the ToString method. You can create parameterless constructs with parameter constructs. The Get Set method based on the member's face.
Extraction of methods
Select the block of code that you want to extract as a method, and right-click Refactor->extract method, and enter the name.
Renaming a variable
If the variable is repeated more in a class, you need to modify it, you can select the variable name, and then refactor->rename, the variable with the same name will be modified.
Introduction and use of Eclipse