void (LibraryOrSdkOrderEntry entry, List<? super AbstractTreeNode<?>> children, Project project, ProjectViewNode node) { final PsiManager psiManager = PsiManager.getInstance(project); VirtualFile[] files = entry instanceof LibraryOrderEntry ? getLibraryRoots((LibraryOrderEntry)entry) : entry.getRootFiles(OrderRootType.CLASSES); for (final VirtualFile file : files) { if (!file.isValid()) continue; if (file.isDirectory()) { final PsiDirectory psiDir = psiManager.findDirectory(file); if (psiDir == null) { continue; } children.add(new PsiDirectoryNode(project, psiDir, node.getSettings())); } else { final PsiFile psiFile = psiManager.findFile(file); if (psiFile == null) continue; children.add(new PsiFileNode(project, psiFile, node.getSettings())); } } }