diff --git a/testFramework/src/com/intellij/testFramework/fixtures/impl/CodeInsightTestFixtureImpl.java b/testFramework/src/com/intellij/testFramework/fixtures/impl/CodeInsightTestFixtureImpl.java index 042cacb1e666..210e55a3cf25 100644 --- a/testFramework/src/com/intellij/testFramework/fixtures/impl/CodeInsightTestFixtureImpl.java +++ b/testFramework/src/com/intellij/testFramework/fixtures/impl/CodeInsightTestFixtureImpl.java @@ -331,14 +331,18 @@ public class CodeInsightTestFixtureImpl extends BaseFixture implements CodeInsig final Ref duration = new Ref(); new WriteCommandAction.Simple(myProjectFixture.getProject()) { protected void run() throws Exception { - myFile = myPsiManager.findFile(file); - myEditor = createEditor(file); + openFileInEditor(file); collectAndCheckHighlightings(checkWarnings, checkInfos, checkWeakWarnings, duration); } }.execute().throwException(); return duration.get().longValue(); } + public void openFileInEditor(@NotNull final VirtualFile file) { + myFile = myPsiManager.findFile(file); + myEditor = createEditor(file); + } + public void testInspection(String testDir, InspectionTool tool) throws Exception { VirtualFile sourceDir = copyDirectoryToProject(new File(testDir, "src").getPath(), "src"); AnalysisScope scope = new AnalysisScope(getPsiManager().findDirectory(sourceDir));