From 6ca43b047b67495b9246b4dae691154f031de7a7 Mon Sep 17 00:00:00 2001 From: Maxim Mossienko Date: Sat, 5 Mar 2005 16:07:24 +0300 Subject: [PATCH] explicit dropping caches when adding (expr) to nodes --- source/com/intellij/psi/impl/source/tree/SourceUtil.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/com/intellij/psi/impl/source/tree/SourceUtil.java b/source/com/intellij/psi/impl/source/tree/SourceUtil.java index e84b37aa68a6..f433089b63ef 100644 --- a/source/com/intellij/psi/impl/source/tree/SourceUtil.java +++ b/source/com/intellij/psi/impl/source/tree/SourceUtil.java @@ -66,7 +66,6 @@ public class SourceUtil implements Constants { TreeUtil.addChildren(parenthExpr, dummyExpr); TreeUtil.addChildren(parenthExpr, Factory.createLeafElement(JavaTokenType.RPARENTH, new char[]{')'}, 0, 1, -1, charTableByTree)); - try { CodeStyleManager codeStyleManager = manager.getCodeStyleManager(); parenthExpr = @@ -81,6 +80,8 @@ public class SourceUtil implements Constants { TreeUtil.replaceWithList(dummyExpr, newChild); newChild = parenthExpr; + // TODO remove explicit caches drop since this should be ok iff we will use ChangeUtil for the modification + TreeUtil.clearCaches(newChild); return newChild; }