XmlFile (String path) { VirtualFile virtualFile = myFixture.copyFileToProject(path); assertNotNull(virtualFile); XmlFile file = (XmlFile)((PsiManagerEx)getPsiManager()).getFileManager().findFile(virtualFile); assertFalse(file.getNode().isParsed()); ObjectStubTree tree = StubTreeLoader.getInstance().readOrBuild(getProject(), virtualFile, file); assertNotNull("Can't build stubs for " + path, tree); ((PsiManagerImpl)getPsiManager()).cleanupForNextTest(); file = (XmlFile)getPsiManager().findFile(virtualFile); assertNotNull(file); return file; }