Java Reference
In-Depth Information
Preserving your own formatting
The Keep When Reformatting option group lets you specify code scenarios that
should not be reformatted with your code style settings. This lets you preserve
exceptional formatting while still using the code-formatting features for the most
part. You can elect to preserve these five types of formatting as is:
Line breaks —If selected, IDEA leaves all your line breaks alone. Other-
wise, reformatting your code automatically adds and removes line breaks
as necessary to match your code style settings.
Comment at first column —If selected, any comments that begin at the first
column retain their position rather than being indented to match the
indentation level of the code they accompany.
Simple methods in one line —If selected, any methods written in one line
retain their formatting when the code is reformatted rather than follow all
the usual code style settings.
Simple blocks in one line —Similarly, if selected, any code blocks written
in one line retain their formatting when the code is reformatted rather
than follow all the usual code style settings.
Control statement in one line —If selected, control statements (such as if ,
for , and so on) are left on a single line if that's the way they're entered.
Otherwise, your code style settings will be used to position the body of the
control statement.
Placing comments
The Comments option group controls how line and block comments should
appear. For each type of comment, you can enable the option to place the com-
ments at the first column. This means that when you ask IDEA to comment out a
line, it places the comment characters either at the very start of the line or just in
front of the first non whitespace character.
Two new options on the General tab of the Code Style settings panel allow you to
control how IDEA handles the declaration of generated local variables and
parameters. If either the Make generated local variables final or the Make gene-
rated parameters final option is enabled, IDEA automatically includes the final
modifier in their declaration.
 
 
 
 
 
 
 
 
 
 
 
 
Search WWH ::




Custom Search