use of com.igormaznitsa.ideamindmap.lang.MMDFile in project netbeans-mmd-plugin by raydac.
the class IdeaUtils method findPsiFileLinksForProjectScope.
public static List<PsiExtraFile> findPsiFileLinksForProjectScope(final Project project) {
List<PsiExtraFile> result = new ArrayList<PsiExtraFile>();
Collection<VirtualFile> virtualFiles = FileBasedIndex.getInstance().getContainingFiles(FileTypeIndex.NAME, MindMapFileType.INSTANCE, GlobalSearchScope.allScope(project));
for (VirtualFile virtualFile : virtualFiles) {
final MMDFile simpleFile = (MMDFile) PsiManager.getInstance(project).findFile(virtualFile);
if (simpleFile != null) {
final PsiExtraFile[] fileLinks = PsiTreeUtil.getChildrenOfType(simpleFile, PsiExtraFile.class);
if (fileLinks != null) {
Collections.addAll(result, fileLinks);
}
}
}
return result;
}
Aggregations