void () { // Inspired by IDEA-54667 getSettings().ENUM_CONSTANTS_WRAP = CommonCodeStyleSettings.WRAP_AS_NEEDED; getSettings().RIGHT_MARGIN = 80; // Don't expect the constants to be placed on new line. doTextTest( "enum Test {FIRST, SECOND}", "enum Test {FIRST, SECOND}" ); // Expect not only enum constants to be wrapped but line break inside enum-level curly braces as well. doTextTest( "enum Test {FIRST, SECOND, THIIIIIIIIIIIIIIIIIRRDDDDDDDDDDDDDD, FOURTHHHHHHHHHHHHHHHH}", """ enum Test { FIRST, SECOND, THIIIIIIIIIIIIIIIIIRRDDDDDDDDDDDDDD, FOURTHHHHHHHHHHHHHHHH }""" ); }