Misc

Lets you control miscellaneous comment options.

Keep first column comments as-is

When enabled, first column comments are never formatted and/or wrapped. As the name implies, first column comments are those comments that start at column one. They are typically used for commenting out blocks of code during development—something you might not want to be changed by a formatter.

Since 1.6

Example 2.772. First column comment

// System.out.println("appendingRemainingName: " + name.toString());
// Exception e = new Exception();
// e.printStackTrace();

Example 2.773. Wrapped first column comment

// System.out.println("appendingRemainingName: " + name.toString()); Exception 
// e = new Exception(); e.printStackTrace();

Move comments after brace block

When enabled, single comments that appear in the first line after the left curly brace of a statement block and only cover one line, are moved right after the brace. This way you can achieve a more dense layout in case you want to save vertical space.

Since 1.7

Example 2.774. Comments after left curly braces

void test()
{
    /**
     * @todo evaluate whether this is still necessary
     */
    if (condition1)
    {
        // i should do something
        doSomething();
    }
    else if (condition2)
    {
        // [PENDING] this should be part of whatever, ask Jeff
        // what to do
        takeAction();
    }
}

When the option is enabled, the example above would be printed as:

Example 2.775. Comments after left curly braces

void test()
{
    /**
     * @todo evaluate whether this is still necessary
     */
    if (condition1)
    { // i should do something
        doSomething();
    }
    else if (condition2)
    {
        // [PENDING] this should be part of whatever, ask Jeff
        // what to do
        takeAction();
    }
}

Please note how only the single comment within the if statement is affected. The comment before the if statement and the consecutive comments after the else statement have been left untouched.