Configure eclipse formatter to place the enum's semicolon on its own line

Viewed 44

Currently I have auto-formatting like this:

public enum EnumConstants {
    EMPTY(),
    TINY(1),
    LARGER(5),;

    EnumConstants(){

    }

    EnumConstants(Object a){

    }
    int getVal() {
        return 1;
    }
}

Which is very close to what I want. However, I want to emphasize the semicolon and I want to, among other reasons, simplify the work on git when comparing changes made to files.

Given so, I want to format the file like this:

public enum EnumConstants {
    EMPTY(),
    TINY(1),
    LARGER(5),
    ;

    EnumConstants(){

    }

    EnumConstants(Object a){

    }
    int getVal() {
        return 1;
    }
}

Notice that only the semicolon changed.

What options allow that adjustment?

0 Answers
Related