mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-13 21:55:01 +07:00
don't show + for empty directories and packages in project view
This commit is contained in:
@@ -214,6 +214,12 @@ public class PackageElementNode extends ProjectViewNode<PackageElement> {
|
||||
|
||||
@Override
|
||||
public boolean isAlwaysShowPlus() {
|
||||
return true;
|
||||
for (final VirtualFile dir : getVirtualFiles()) {
|
||||
if (dir.getChildren().length > 0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+2
-1
@@ -321,6 +321,7 @@ public class PsiDirectoryNode extends BasePsiNode<PsiDirectory> implements Navig
|
||||
|
||||
@Override
|
||||
public boolean isAlwaysShowPlus() {
|
||||
return true;
|
||||
final VirtualFile file = getVirtualFile();
|
||||
return file == null || file.getChildren().length > 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user