diff --git a/idea/tests/org/jetbrains/jet/checkers/AbstractJetPsiCheckerTest.java b/idea/tests/org/jetbrains/jet/checkers/AbstractJetPsiCheckerTest.java index d4181686dda..c9cf3dc8492 100644 --- a/idea/tests/org/jetbrains/jet/checkers/AbstractJetPsiCheckerTest.java +++ b/idea/tests/org/jetbrains/jet/checkers/AbstractJetPsiCheckerTest.java @@ -16,10 +16,8 @@ package org.jetbrains.jet.checkers; -import com.intellij.ProjectTopics; import com.intellij.codeInsight.daemon.LightDaemonAnalyzerTestCase; import com.intellij.openapi.projectRoots.Sdk; -import com.intellij.openapi.roots.impl.ModuleRootEventImpl; import org.jetbrains.annotations.NotNull; import org.jetbrains.jet.plugin.PluginTestCaseBase; import org.jetbrains.jet.test.generator.SimpleTestClassModel; @@ -33,21 +31,6 @@ import java.util.Arrays; * @author abreslav */ public abstract class AbstractJetPsiCheckerTest extends LightDaemonAnalyzerTestCase { - - @Override - protected void tearDown() throws Exception { - super.tearDown(); - /* - * TODO: remove this when fixed in IDEA - * super.tearDown() calls cleanupForNextTest() on PsiManagerImpl, which invalidates a cache of view providers - * this affects ExternalAnnotationsManagerImpl making XmlFile instances cached in it invalid - * this results in external annotations being not found, unless we invalidate the cache in ExternalAnnotationsManagerImpl. - * Currently, sending this funny event is the only way (apart from reflection) to invalidate that cache. - * The problem will be fixed in IDEA soon (hopefully). - */ - getProject().getMessageBus().syncPublisher(ProjectTopics.PROJECT_ROOTS).rootsChanged(new ModuleRootEventImpl(getProject(), true)); - } - public void doTest(@NotNull String filePath) throws Exception { doTest(filePath, true, false); } diff --git a/idea/tests/org/jetbrains/jet/plugin/codeInsight/LiveTemplatesTest.java b/idea/tests/org/jetbrains/jet/plugin/codeInsight/LiveTemplatesTest.java index a0e22f274ff..13303853f18 100644 --- a/idea/tests/org/jetbrains/jet/plugin/codeInsight/LiveTemplatesTest.java +++ b/idea/tests/org/jetbrains/jet/plugin/codeInsight/LiveTemplatesTest.java @@ -16,7 +16,6 @@ package org.jetbrains.jet.plugin.codeInsight; -import com.intellij.ProjectTopics; import com.intellij.codeInsight.lookup.LookupElement; import com.intellij.codeInsight.lookup.LookupEx; import com.intellij.codeInsight.lookup.LookupManager; @@ -28,7 +27,6 @@ import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.command.CommandProcessor; import com.intellij.openapi.editor.actionSystem.EditorActionHandler; import com.intellij.openapi.editor.actionSystem.EditorActionManager; -import com.intellij.openapi.roots.impl.ModuleRootEventImpl; import com.intellij.testFramework.LightProjectDescriptor; import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase; import com.intellij.util.ArrayUtil; @@ -57,16 +55,6 @@ public class LiveTemplatesTest extends LightCodeInsightFixtureTestCase { @Override protected void tearDown() throws Exception { - /* - * TODO: remove this when fixed in IDEA - * super.tearDown() calls cleanupForNextTest() on PsiManagerImpl, which invalidates a cache of view providers - * this affects ExternalAnnotationsManagerImpl making XmlFile instances cached in it invalid - * this results in external annotations being not found, unless we invalidate the cache in ExternalAnnotationsManagerImpl. - * Currently, sending this funny event is the only way (apart from reflection) to invalidate that cache. - * The problem will be fixed in IDEA soon (hopefully). - */ - getProject().getMessageBus().syncPublisher(ProjectTopics.PROJECT_ROOTS).rootsChanged(new ModuleRootEventImpl(getProject(), true)); - ((TemplateManagerImpl) TemplateManager.getInstance(getProject())).setTemplateTesting(false); super.tearDown(); }