Project View: show special icon for content root of unloaded modules (IDEA-27471)

This commit is contained in:
nik
2017-06-07 19:31:29 +02:00
parent 82c4442264
commit 6aab284c25
2 changed files with 13 additions and 0 deletions
@@ -59,6 +59,9 @@ public class JavaDirectoryIconProvider extends IconProvider implements DumbAware
Module module = ProjectRootManager.getInstance(project).getFileIndex().getModuleForFile(vFile);
symbolIcon = module != null ? ModuleType.get(module).getIcon() : PlatformIcons.CONTENT_ROOT_ICON_CLOSED;
}
else if (ProjectRootsUtil.computeNameOfUnloadedModuleByContentRoot(vFile, project) != null) {
symbolIcon = AllIcons.Modules.UnloadedModule;
}
else if ((sourceFolder = ProjectRootsUtil.getModuleSourceRoot(vFile, project)) != null) {
symbolIcon = SourceRootPresentation.getSourceRootIcon(sourceFolder);
}