void () { getSettings(JavaLanguage.INSTANCE).ENUM_CONSTANTS_WRAP = CommonCodeStyleSettings.WRAP_ALWAYS; final LanguageLevel effectiveLanguageLevel = LanguageLevelProjectExtension.getInstance(getProject()).getLanguageLevel(); try { LanguageLevelProjectExtension.getInstance(getProject()).setLanguageLevel(LanguageLevel.JDK_1_5); doTextTest(""" enum Breed { Dalmatian ( "spotted" ),Labrador ( "black" ),Dachshund( "brown" ); // constructor Breed ( String colour ) { this.colour = colour; } private String colour; // additional method of every Breed object public String getColour() { return colour; } }\ """, """ enum Breed { Dalmatian("spotted"), Labrador("black"), Dachshund("brown"); // constructor Breed(String colour) { this.colour = colour; } private String colour; // additional method of every Breed object public String getColour() { return colour; } }"""); doTextTest(""" enum Breed { Dalmatian ( "spotted" ),Labrador ( "black" ),Dachshund( "brown" ) }\ """, """ enum Breed { Dalmatian("spotted"), Labrador("black"), Dachshund("brown") }"""); doTextTest(""" enum Command {\s USED\s ,\s UNUSED ;\s }""", """ enum Command { USED, UNUSED; }"""); } finally { LanguageLevelProjectExtension.getInstance(getProject()).setLanguageLevel(effectiveLanguageLevel); } }