Jindent - Java Source Code Formatter http://www.jindent.com
 



title
5.6.1.10.4 Trailing Comments

Align trailing comments

Align trailing comments

Controls whether trailing comments are aligned within one source code chunk or not.


Align trailing comments:

private int field1 = 10;               // trailing comment
private int field2 = 0x0100010101b;    // trailing comment
private String msg = "abc";            // another trailing comment


Do not align trailing comments:

private int field1 = 10;    // trailing comment
private int field2 = 0x0100010101b;    // trailing comment
private String msg = "abc";    // another trailing comment

See also... See also: Jindent - Settings - Formatter - Java / SQLJ - Alignments - Chunks




Align trailing comments exceeding max. line length

Align trailing comments exceeding max. line length

Controls whether trailing comments which exceed maximal line length are aligned with other trailing comments or not.


Align exceeding trailing comments:

private int field1 = 10;                       // trailing comment         |
private int field2 = 0x0100010101b;            // trailing comment         |
private String msg = "abcdefghijklmnop...";    // another long trailing comment

Even if trailing comment // another long trailing comment is exceeding maximal line length it will be aligned.


Do not align exceeding trailing comments:

private int field1 = 10;               // trailing comment                 |
private int field2 = 0x0100010101b;    // trailing comment                 |
private String msg = "abcdefghijklmnop...";    // another long trailing comment




Minimum number of spaces to separate trailing comments from code

Minimum number of spaces to separate
	trailing comments from code

Specifies the minimum number of white spaces to indent trailing comments from source code.


Minimum indentation of 4 spaces (alignment of trailing comments is in use):

private int field1 = 10;               // trailing comment
private int field2 = 0x0100010101b;|--|// trailing comment
private String msg = "abc";            // another trailing comment


Minimum indentation of 8 spaces:

private int field1 = 10;                   // trailing comment
private int field2 = 0x0100010101b;|------|// trailing comment
private String msg = "abc";                // another trailing comment



Indent trailing comments by tab stops

Indent trailing comments by tab stops

Controls whether trailing comments are indented by spaces or tabulator stops.


Indent trailing comments by tabulator stops:

private int field1 = 10;--->--->--->--->// trailing comment
private int field2 = 0x0100010101b;>--->// trailing comment
private String msg = "abc";>--->--->--->// another trailing comment


Do not indent trailing comments by tabulator stops, rather use white spaces:

private·int·field1·=·10;···············//·trailing·comment
private·int·field2·=·0x0100010101b;····//·trailing·comment
private·String·msg·=·"abc";············//·another·trailing·comment