EA-56301 - assert: ProjectViewModuleNode.getChildren

This commit is contained in:
peter
2015-05-21 17:27:58 +02:00
parent f77da63b46
commit 04dac377df
@@ -57,22 +57,22 @@ public class ProjectViewModuleNode extends AbstractModuleNode {
final VirtualFile[] contentRoots = rootManager.getContentRoots();
final List<AbstractTreeNode> children = new ArrayList<AbstractTreeNode>(contentRoots.length + 1);
final PsiManager psiManager = PsiManager.getInstance(getProject());
final PsiManager psiManager = PsiManager.getInstance(module.getProject());
for (final VirtualFile contentRoot : contentRoots) {
if (!moduleFileIndex.isInContent(contentRoot)) continue;
AbstractTreeNode child;
if (contentRoot.isDirectory()) {
PsiDirectory directory = psiManager.findDirectory(contentRoot);
LOG.assertTrue(directory != null);
child = new PsiDirectoryNode(getProject(), directory, getSettings());
if (directory != null) {
children.add(new PsiDirectoryNode(getProject(), directory, getSettings()));
}
}
else {
PsiFile file = psiManager.findFile(contentRoot);
LOG.assertTrue(file != null);
child = new PsiFileNode(getProject(), file, getSettings());
if (file != null) {
children.add(new PsiFileNode(getProject(), file, getSettings()));
}
}
children.add(child);
}
/*