mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
performance
This commit is contained in:
committed by
Kirill Kalishev
parent
a23de279d1
commit
37e35c262b
@@ -180,7 +180,7 @@ public class TreeUtil {
|
||||
}
|
||||
|
||||
public static Pair<ASTNode, ASTNode> findTopmostSiblingParents(ASTNode one, ASTNode two) {
|
||||
if (one == two) return (Pair)Pair.create(null, null);
|
||||
if (one == two) return Pair.create(null, null);
|
||||
|
||||
LinkedList<ASTNode> oneParents = new LinkedList<ASTNode>();
|
||||
LinkedList<ASTNode> twoParents = new LinkedList<ASTNode>();
|
||||
@@ -199,11 +199,11 @@ public class TreeUtil {
|
||||
}
|
||||
while (one == two && one != null);
|
||||
|
||||
return new Pair(one, two);
|
||||
return new Pair<ASTNode, ASTNode>(one, two);
|
||||
}
|
||||
|
||||
public static void clearCaches(@NotNull final TreeElement tree) {
|
||||
tree.acceptTree(new RecursiveTreeElementWalkingVisitor() {
|
||||
tree.acceptTree(new RecursiveTreeElementWalkingVisitor(false) {
|
||||
@Override
|
||||
protected void visitNode(final TreeElement element) {
|
||||
element.clearCaches();
|
||||
|
||||
Reference in New Issue
Block a user