IntelliJ IDEA 11.1 Web Help

Code | Reformat Code
Ctrl+Alt+LCommand Alt L


In this dialog box, specify the scope to apply reformatting to.

Item Description
File Select this option to have all the source code in the current file reformatted.
Selected text Select this option to have the currently selected fragment of source code reformatted.
All files in directory... Select this option to have the source code in all the files in the current directory reformatted at once.
Include subdirectories Select this check box to have source code from files in subfolders reformatted.
Optimize imports Select this check box to remove unused import statements from the code within the selected scope.
Run Click this button to have IntelliJ IDEA start reformatting the source code within the specified scope.

See Also

Procedures:

Reference:

Web Resources: