mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
java: formatting of type annotations inside references
This commit is contained in:
@@ -1480,9 +1480,12 @@ public class JavaSpacePropertyProcessor extends JavaElementVisitor {
|
||||
else if (myRole2 == ChildRole.REFERENCE_PARAMETER_LIST) {
|
||||
createSpaceInCode(mySettings.SPACE_BEFORE_TYPE_PARAMETER_LIST);
|
||||
}
|
||||
else if (myRole2 == ChildRole.DOT){
|
||||
else if (myRole2 == ChildRole.DOT) {
|
||||
createSpaceInCode(false);
|
||||
}
|
||||
else if (myType1 == JavaElementType.ANNOTATION) {
|
||||
createSpaceInCode(true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -540,4 +540,18 @@ public class JavaFormatterSpaceTest extends AbstractJavaFormatterTest {
|
||||
getJavaSettings().SPACE_AROUND_TYPE_BOUNDS_IN_TYPE_PARAMETERS = false;
|
||||
doTextTest(before, "public class Foo<T extends Bar&Abba, U> {\n}");
|
||||
}
|
||||
|
||||
public void testInnerTypeAnnotations() {
|
||||
doTextTest(
|
||||
"class C<@TA(1)T> {\n" +
|
||||
" L<@TA(2)A> f = (@TA(3) A) new @TA(4) A() {\n" +
|
||||
" };\n" +
|
||||
"}",
|
||||
|
||||
"class C<@TA(1) T> {\n" +
|
||||
" L<@TA(2) A> f = (@TA(3) A) new @TA(4) A() {\n" +
|
||||
" };\n" +
|
||||
"}"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user