void () { // Inspired by IDEA-18051 getSettings().RIGHT_MARGIN = 80; doTextTest( """ package formatting; public class EnumInAnnotationFormatting { public enum TheEnum { FIRST, SECOND, THIRD, } public @interface TheAnnotation { TheEnum[] value(); String comment(); } @TheAnnotation(value = {TheEnum.FIRST, TheEnum.SECOND}, comment = "some long comment that goes longer that right margin 012345678901234567890") public class Test { } }""", """ package formatting; public class EnumInAnnotationFormatting { public enum TheEnum { FIRST, SECOND, THIRD, } public @interface TheAnnotation { TheEnum[] value(); String comment(); } @TheAnnotation(value = {TheEnum.FIRST, TheEnum.SECOND}, comment = "some long comment that goes longer that right margin 012345678901234567890") public class Test { } }"""); }