Comments

Lets you control the insertion of trailing comments after a closing brace to assist matching corresponding braces. Such comments are called identifying comments.

Figure 2.34. Braces Comments settings page

Braces Comments settings page
Insert identifying comments for
Class

Lets you insert identifying comments for class declarations.

Since 1.3

Example 2.86. Identifying class comment

public class Foo {

    public String getName() {
        return ...;
    }

    ...
} // end class Foo
Interface

Lets you enable the insertion of identifying comments for interface declarations.

Since 1.3

Example 2.87. Identifying interface comment

public interface Fooable {

    public String getName();

    ...
} // end interface Fooable
Constructor

Lets you enable the insertion of identifying comments for constructor declarations.

Since 1.3

Example 2.88. Identifying constructor comment

public class Foo {

    public Foo() {
        super();
    } // end ctor Foo

    ...
}
Method

Lets you enable the insertion of identifying comments for method declarations.

Since 1.3

Example 2.89. Identifying method comment

public class Foo {

    public void getName() {
        return _name;
    } // end method getName

    ...
}
if...else

Lets you enable the insertion of identifying comments for if/else statement blocks.

Since 1.3

Example 2.90. Identifying if-else comment

if (true) {
    ...
} // end if


if (true) {
    ...
} else if (false) {
    ...
} // end if-else


if (true) {
    ...
} else if (false) {
    ...
} else {
    ...
} // end if-else
while

Lets you enable the insertion of identifying comments for while statement blocks.

Since 1.3

Example 2.91. Identifying while comment

while (true) {
    ...
} // end while
for

Lets you enable the insertion of identifying comments for for statement blocks.

Since 1.3

Example 2.92. Identifying for comment

for (int i = 0; object.length; i++) {
    ...
} // end for
switch

Lets you enable the insertion of identifying comments for switch statement blocks.

Since 1.8

Example 2.93. Identifying switch comment

switch (state) {
    ...
} // end switch
try...catch...finally

Lets you enable the insertion of identifying comments for try/catch/finally blocks.

Since 1.3

Example 2.94. Identifying try-catch comment

try {
    ...
} catch (Throwable ex) {
    ...
} // end try-catch


try {
    ...
} catch (IOException ex) {
    ...
} finally {
    ...
} // end try-catch-finally


try {
    ...
} finally {
    ...
} // end try-finally
synchronized

Lets you enable the insertion of identifying comments for synchronized statement blocks.

Since 1.3

Example 2.95. Identifying synchronized comment

synchronized (this) {
    ...
} // end synchronized
Only add when brace body greater/equal than n lines

Lets you specify the size of a brace body that is necessary in order to see identifying comments inserted. For example, you might want to require identifying comments only on brace bodies that have at least 30 lines.

Since 1.3