From 010bfe04cd657d14ae0df115904d9f0f40724b4e Mon Sep 17 00:00:00 2001 From: Alexey Kudravtsev Date: Tue, 30 Dec 2008 19:12:03 +0300 Subject: [PATCH] do not queue nonphysical elements --- .../src/com/intellij/codeInsight/daemon/impl/PsiChangeHandler.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lang-impl/src/com/intellij/codeInsight/daemon/impl/PsiChangeHandler.java b/lang-impl/src/com/intellij/codeInsight/daemon/impl/PsiChangeHandler.java index 43a6b80b96..162b17a750 100644 --- a/lang-impl/src/com/intellij/codeInsight/daemon/impl/PsiChangeHandler.java +++ b/lang-impl/src/com/intellij/codeInsight/daemon/impl/PsiChangeHandler.java @@ -23,6 +23,7 @@ import com.intellij.psi.impl.PsiDocumentTransactionListener; import com.intellij.util.SmartList; import com.intellij.util.messages.MessageBusConnection; import com.intellij.codeInspection.SuppressionUtil; +import com.intellij.testFramework.LightVirtualFile; import gnu.trove.THashMap; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -91,8 +92,7 @@ public class PsiChangeHandler extends PsiTreeChangeAdapter implements Disposable } public void childRemoved(PsiTreeChangeEvent event) { - PsiElement element = event.getParent(); - queueElement(element, true, event); + queueElement(event.getParent(), true, event); } public void childReplaced(PsiTreeChangeEvent event) { @@ -138,6 +138,9 @@ public class PsiChangeHandler extends PsiTreeChangeAdapter implements Disposable } if (!child.isValid()) return; + if (file.getViewProvider().getVirtualFile() instanceof LightVirtualFile) { // must filter out non-physical elements and do not forget that tests can reside in TempFileSystem + return; + } Document document = PsiDocumentManager.getInstance(myProject).getCachedDocument(file); if (document != null) { List> toUpdate = changedElements.get(document); -- 2.11.4.GIT