Search in sources :

Example 1 with DirectoryFileType

use of com.intellij.openapi.fileTypes.DirectoryFileType in project intellij-community by JetBrains.

the class VirtualFilePresentation method getIconImpl.

public static Icon getIconImpl(@NotNull VirtualFile vFile) {
    Icon icon = TypePresentationService.getService().getIcon(vFile);
    if (icon != null) {
        return icon;
    }
    FileType fileType = vFile.getFileType();
    if (vFile.isDirectory() && vFile.isInLocalFileSystem() && !(fileType instanceof DirectoryFileType)) {
        return PlatformIcons.FOLDER_ICON;
    }
    return fileType.getIcon();
}
Also used : DirectoryFileType(com.intellij.openapi.fileTypes.DirectoryFileType) FileType(com.intellij.openapi.fileTypes.FileType) DirectoryFileType(com.intellij.openapi.fileTypes.DirectoryFileType)

Aggregations

DirectoryFileType (com.intellij.openapi.fileTypes.DirectoryFileType)1 FileType (com.intellij.openapi.fileTypes.FileType)1