List<PsiFile> () { myFiles.clear(); myJars.clear(); PsiManager psiManager = PsiManager.getInstance(myProject); List<PsiFile> files = new ArrayList<>(); for (PsiFile file : search(myModule, myProject)) { files.add(file); VirtualFile jar = JarFileSystem.getInstance().getVirtualFileForJar(file.getVirtualFile()); if (jar != null) { myJars.putValue(jar, file); } else { Module module = ModuleUtilCore.findModuleForPsiElement(file); if (module != null) { myFiles.putValue(module, file); } else { VirtualFile virtualFile = file.getVirtualFile(); myVirtualFiles.putValue(virtualFile.getParent(), psiManager.findFile(virtualFile)); } } } return files; }