mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[IDEA-167425] formatter: fixed misplaced rbrace position
This commit is contained in:
@@ -1138,7 +1138,8 @@ public class JavaSpacePropertyProcessor extends JavaElementVisitor {
|
||||
}
|
||||
else if (myRole2 == ChildRole.TYPE
|
||||
&& myChild1.getLastChildNode() != null
|
||||
&& myChild1.getLastChildNode().getElementType() == JavaElementType.ANNOTATION) {
|
||||
&& myChild1.getLastChildNode().getElementType() == JavaElementType.ANNOTATION
|
||||
|| myRole1 == ChildRole.MODIFIER_LIST && myRole2 == ChildRole.RBRACE) {
|
||||
createSpaceProperty(true, mySettings.KEEP_LINE_BREAKS, 0);
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -3377,5 +3377,16 @@ public void testSCR260() throws Exception {
|
||||
"}"
|
||||
);
|
||||
}
|
||||
|
||||
public void testPreserveRbraceOnItsLine() {
|
||||
doClassTest(
|
||||
"class SomeTest {\n" +
|
||||
" @Test\n" +
|
||||
"}",
|
||||
"class SomeTest {\n" +
|
||||
" @Test\n" +
|
||||
"}"
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user