mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
support hiding PsiDirectoryNode sources roots
This commit is contained in:
+5
-1
@@ -69,6 +69,10 @@ public class PsiDirectoryNode extends BasePsiNode<PsiDirectory> implements Navig
|
||||
return !PlatformUtils.isCidr();
|
||||
}
|
||||
|
||||
protected boolean shouldShowSourcesRoot() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateImpl(PresentationData data) {
|
||||
Project project = getProject();
|
||||
@@ -104,7 +108,7 @@ public class PsiDirectoryNode extends BasePsiNode<PsiDirectory> implements Navig
|
||||
final String location = FileUtil.getLocationRelativeToUserHome(directoryFile.getPresentableUrl());
|
||||
data.addText(" (" + location + ")", SimpleTextAttributes.GRAYED_ATTRIBUTES);
|
||||
}
|
||||
else {
|
||||
else if (shouldShowSourcesRoot()) {
|
||||
SourceFolder sourceRoot = ProjectRootsUtil.getModuleSourceRoot(directoryFile, project);
|
||||
if (sourceRoot != null) {
|
||||
ModuleSourceRootEditHandler<?> handler = ModuleSourceRootEditHandler.getEditHandler(sourceRoot.getRootType());
|
||||
|
||||
Reference in New Issue
Block a user