void () { VirtualFile txtFile = createChildData(myPrjDir1, "a.txt"); VirtualFile txtFile1 = createChildData(myPrjDir1.getParent(), "a.txt"); VirtualFile javaFile = createChildData(mySrcDir1, "a.java"); VirtualFile javaFile1 = createChildData(myPrjDir1, "a.java"); VirtualFile compiledFileInSrc = createChildData(mySrcDir1, "a.class"); VirtualFile compiledFileInCls = createChildData(myClsDir1, "a.class"); VirtualFile excludedFile = createChildData(myExcludedDir1, "a.txt"); FileManagerImpl fileManager = (FileManagerImpl)myPsiManager.getFileManager(); PsiFile txtPsiFile = fileManager.findFile(txtFile); assertTrue(txtPsiFile instanceof PsiPlainTextFile); PsiFile txtPsiFile1 = fileManager.findFile(txtFile1); assertTrue(txtPsiFile1 instanceof PsiPlainTextFile); PsiFile javaPsiFile = fileManager.findFile(javaFile); assertTrue(javaPsiFile instanceof PsiJavaFile); PsiFile javaPsiFile1 = fileManager.findFile(javaFile1); assertTrue(javaPsiFile1 instanceof PsiJavaFile); PsiFile compiledPsiFile = fileManager.findFile(compiledFileInSrc); assertInstanceOf(compiledPsiFile, PsiBinaryFile.class); PsiFile compiledPsiFile1 = fileManager.findFile(compiledFileInCls); assertTrue(compiledPsiFile1 instanceof PsiJavaFile); assertTrue(compiledPsiFile1 instanceof PsiCompiledElement); PsiFile excludedPsiFile = fileManager.findFile(excludedFile); assertNotNull(excludedPsiFile); }