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



title
5.6.2.10.6 Trailing Comments

Align trailing comments

Align trailing comments

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


Align trailing comments:

int field1 = 10;               // trailing comment
int field2 = 0x0100010101b;    // trailing comment
char[] msg = "abc";            // another trailing comment


Do not align trailing comments:

int field1 = 10;    // trailing comment 
int field2 = 0x0100010101b;    // trailing comment
char[] msg = "abc";    // another trailing comment

See also... See also: Jindent - Settings - Formatter - C / C++ - 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:

int field1 = 10;                       // trailing comment                 |
int field2 = 0x0100010101b;            // trailing comment                 |
char[] 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:

int field1 = 10;               // trailing comment                         |
int field2 = 0x0100010101b;    // trailing comment                         |
char[] 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):

int field1 = 10;               // trailing comment
int field2 = 0x0100010101b;|--|// trailing comment
char[] msg = "abc";            // another trailing comment


Minimum indentation of 8 spaces:

int field1 = 10;                   // trailing comment
int field2 = 0x0100010101b;|------|// trailing comment
char[] 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:

int field1 = 10;--->--->--->--->// trailing comment
int field2 = 0x0100010101b;>--->// trailing comment
char[] msg = "abc";>--->--->--->// another trailing comment


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

int·field1·=·10;···············//·trailing·comment
int·field2·=·0x0100010101b;····//·trailing·comment
char[]·msg·=·"abc";············//·another·trailing·comment