IntelliJ IDEA 2017.2 Help

Formatting

File | Settings | Editor | Copyright | Formatting for Windows and Linux
IntelliJ IDEA | Preferences | Editor | Copyright | Formatting for macOS
Ctrl+Alt+S
settings


Use this page to configure common formatting options, regardless of the type of a particular file.

ItemDescription
Comment TypeIn this area, specify the type of comment to enclose copyright notices in. The available options are:
  • Use block comment - select this option to have copyright notices enclosed in block comments.
  • Prefix each line - select this check box to have each line of a copyright notice prepended with the character defined in the Separator char text box. By default, an asterisk is used.
  • Use line comment - select this option to have copyright notices represented as a sequence of line comments.
BordersIn this area, define how to separate copyright notices from other comments.
  • Separator before - select this check box have a copyright notice prepended with a line of characters defined in the Separator char text box. The number of characters in a separator line is defined in the Length text box.
  • Separator after - select this check box have a copyright notice followed by a line of characters defined in the Separator char text box. The number of characters in a separator line is defined in the Length text box.
  • Separator char - in this text box, type the character that will be used in the separator strings and as a prefix or ending character in block comments.
  • Box - select this check box to have each line of a copyright notice followed by a character defined in the Separator char text box.
  • Add blank line after - select this check box to have a blank line inserted after a copyright notice.
Relative LocationIn this area, specify the location of a copyright notice relative to other comments in a file.
  • Before other comments - when this option is selected, copyright notices are inserted above other comments.
  • After other comments - when this option is selected, copyright notices are inserted below other comments.
PreviewUse this area to view a sample copyright notice with the formatting you have defined.
Last modified: 29 November 2017