mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
[java] module icons
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -27,6 +27,7 @@ import com.intellij.openapi.roots.SourceFolder;
|
||||
import com.intellij.openapi.roots.ui.configuration.SourceRootPresentation;
|
||||
import com.intellij.openapi.util.registry.Registry;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.openapi.vfs.impl.jrt.JrtFileSystem;
|
||||
import com.intellij.openapi.vfs.newvfs.ArchiveFileSystem;
|
||||
import com.intellij.psi.JavaDirectoryService;
|
||||
import com.intellij.psi.PsiDirectory;
|
||||
@@ -61,6 +62,9 @@ public class JavaDirectoryIconProvider extends IconProvider implements DumbAware
|
||||
else if ((sourceFolder = ProjectRootsUtil.getModuleSourceRoot(vFile, project)) != null) {
|
||||
symbolIcon = SourceRootPresentation.getSourceRootIcon(sourceFolder);
|
||||
}
|
||||
else if (JrtFileSystem.isModuleRoot(vFile)) {
|
||||
symbolIcon = AllIcons.Nodes.JavaModuleRoot;
|
||||
}
|
||||
else if (JavaDirectoryService.getInstance().getPackage(psiDirectory) != null) {
|
||||
symbolIcon = PlatformIcons.PACKAGE_ICON;
|
||||
}
|
||||
@@ -76,4 +80,4 @@ public class JavaDirectoryIconProvider extends IconProvider implements DumbAware
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user