mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[java] consistent PSI after removing one of multiple declarations (IDEA-175642)
This commit is contained in:
+11
@@ -77,6 +77,17 @@ public class PsiDeclarationStatementImpl extends CompositePsiElement implements
|
||||
}
|
||||
|
||||
super.deleteChildInternal(child);
|
||||
|
||||
TreeElement first = getFirstChildNode();
|
||||
if (first != null && !DECLARED_ELEMENT_BIT_SET.contains(first.getElementType())) {
|
||||
TreeElement last = first;
|
||||
while (true) {
|
||||
TreeElement next = last.getTreeNext();
|
||||
if (next == null || DECLARED_ELEMENT_BIT_SET.contains(next.getElementType())) break;
|
||||
last = next;
|
||||
}
|
||||
getTreeParent().addInternal(first, last, this, Boolean.TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
private void removeCommaBefore(ASTNode child) {
|
||||
|
||||
+2
-1
@@ -5,7 +5,8 @@ class a {
|
||||
int k;
|
||||
|
||||
private int run() {
|
||||
/*ddddd*/ Object oo = (Object) new Integer(0);
|
||||
/*ddddd*/
|
||||
Object oo = (Object) new Integer(0);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user