The following code style and format
Shortcut Key-for a single file
1. crtl + Shift + O
Automatic Processing of import statements (less addition, more deletion, is very suitable for more)
2. CTRL + Shift + F
Automatic formattingCode
Set
1. Set the number of characters in each line of code
Window --> preferences --> JAVA --> code style --> Format
Create a new profile. Then edit this profile
Go to line wrapping --> maximum line width. We recommend that you change from 80 to 120.
In this way, when Ctrl + Shift + F is formatted, the number of characters in each line of code is 120.
2. Batch automatic processing import
Go to the Java view, right-click the project and choose source --> organize imports
3. Batch format code
Right-click the project and choose source> format.
4. Set the number of lines displayed on the console and the default pop-up
In the preferences-> Run/debug-> console, remove the limit console output selection or select to set the buffer size setting value.
Settings pop-up (the console window also has corresponding buttons ):
Preferences-> Run/debug-> In the Console
Deselect the option before show when program writes to standard out (when a value exists in the console ).
And show when program writes to standard error (when an error occurs in the console ).