mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[java formatter] space between enum constant and annotation
This commit is contained in:
@@ -1720,6 +1720,9 @@ public class JavaSpacePropertyProcessor extends JavaElementVisitor {
|
||||
else if (myRole2 == ChildRole.ANONYMOUS_CLASS) {
|
||||
myResult = getSpaceBeforeLBrace(myChild2, mySettings.SPACE_BEFORE_CLASS_LBRACE, null);
|
||||
}
|
||||
else if (myRole1 == ChildRole.MODIFIER_LIST && myRole2 == ChildRole.NAME) {
|
||||
createSpaceInCode(true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -660,5 +660,18 @@ public class JavaFormatterSpaceTest extends AbstractJavaFormatterTest {
|
||||
"public static void bar(@NonNls final String[] args) {\n" +
|
||||
"}");
|
||||
}
|
||||
|
||||
public void testEnumAnnotations() {
|
||||
doTextTest("enum SampleEnum {\n" +
|
||||
" @Annotation(\"1\")ONE,\n" +
|
||||
" @Annotation(\"2\")TWO,\n" +
|
||||
" @Annotation THREE\n" +
|
||||
"}",
|
||||
"enum SampleEnum {\n" +
|
||||
" @Annotation(\"1\") ONE,\n" +
|
||||
" @Annotation(\"2\") TWO,\n" +
|
||||
" @Annotation THREE\n" +
|
||||
"}");
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user