IDEA uses
IDEA and Eclipse as an IDE framework (Integrated Development Environment);
1. The system default settings
a. Shortcuts
hot key |
Explanation |
alt + enter |
Correcting codes, such as importing package |
ctrl + alt + Left |
Method jumps API provides the source code |
ctrl + alt + l |
format |
ctrl + / |
Single-line comments |
ctrl + shift + / |
Multi-line comments |
/** |
Documentation Comments |
shift + enter |
To the next line at an arbitrary position |
shift + f6 |
Batch change name |
ctrl + d |
Copy where the line / multi-line |
ctrl + y |
Delete row |
ctrl + w |
Where the selected elements / statements / lines |
alt + shift + ↑/↓ |
Moving the row / multiple rows selected / selected block |
Tab |
Confirm or right into |
b. quick statement
hot key |
Explanation |
PSVM / hand |
main method |
holes |
for statement |
salt |
System.out.println( ); |
soutv |
System.out.println(" = " + ); |
souf |
System.out.printf(" "); |
set |
The method of constructing the automatic generation method setXXX |
get |
The method of constructing the automatic generation method getXXX |
2. Custom Settings
a. own statement
Can be changed in the File >> Settings >> Editor >> Live Templates, the proposed change in the other:
hot key |
Explanation |
swi |
Switch statement |
out |
An array of enhancements for statement |
soutt |
System.out.print(); |
ford |
for the infinite loop |
whiled |
while the infinite loop |
b. Other settings
Set up |
Explanation |
Automatic clearing invalid import |
Settings >> Editor >> General >> Auto Import 或 Code >> Reformat Code |
3. Structure
Engineering> Module> Package> class;
- General company domain package is reverse writing, such as: com.baidu or com.alibaba;
- import most stable Method: middle window button -> Selected iml -> OK;
4. Appendix
a. Eclipse Shortcuts
hot key |
Explanation |
alt + shift + x -> j |
Run the current main class |
Ctrl + i |
Format (format) |
b. IEAD Debug Mode
IDEA Debug mode
c. IDEA quickly generate the get / set body
IDEA quickly generate the get / set body