mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-107059 Manage spaces after modifier list
This commit is contained in:
+10
@@ -317,6 +317,16 @@ public class GrModifierListImpl extends GrStubElementBase<GrModifierListStub> im
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ASTNode addInternal(ASTNode first, ASTNode last, ASTNode anchor, Boolean before) {
|
||||
final ASTNode node = super.addInternal(first, last, anchor, before);
|
||||
final PsiElement sibling = getNextSibling();
|
||||
if (sibling != null && sibling.getText().contains("\n")) {
|
||||
sibling.replace(GroovyPsiElementFactory.getInstance(getProject()).createWhiteSpace());
|
||||
}
|
||||
return node;
|
||||
}
|
||||
|
||||
private boolean isEmptyModifierList() {
|
||||
return getTextLength() == 0 || getModifiers().length == 0 && getRawAnnotations().length == 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user