ScopeView: temporary solution for IDEA-153822

This commit is contained in:
Sergey Malenkov
2018-04-06 21:12:29 +03:00
parent 527342d5d6
commit ea77124966
@@ -1061,7 +1061,12 @@ public final class ScopeViewTreeModel extends BaseTreeModel<AbstractTreeNode> im
if (element == null) element = node.getPsiElement();
if (element instanceof PsiDirectory && element.isValid()) {
PsiDirectoryFactory factory = PsiDirectoryFactory.getInstance(module.getProject());
if (factory != null && factory.isPackage((PsiDirectory)element)) return AllIcons.Nodes.Package;
if (factory != null && factory.isPackage((PsiDirectory)element)) {
// IDEA-153822: temporary solution to distinguish META-INF from other packages
if (factory.isValidPackageName(factory.getQualifiedName((PsiDirectory)element, false))) {
return AllIcons.Nodes.Package;
}
}
}
}
return AllIcons.Nodes.Folder;