Icon (final String url, final boolean isValid, final boolean isJarDirectory) { final Icon icon; if (isValid) { VirtualFile presentableFile; if (isJarFileRoot(url)) { presentableFile = LocalFileSystem.getInstance().findFileByPath(getPresentablePath(url)); } else { presentableFile = VirtualFileManager.getInstance().findFileByUrl(url); } if (presentableFile != null && presentableFile.isValid()) { if (presentableFile.getFileSystem() instanceof HttpFileSystem) { icon = PlatformIcons.WEB_ICON; } else { if (presentableFile.isDirectory()) { if (isJarDirectory) { icon = AllIcons.Nodes.JarDirectory; } else { icon = PlatformIcons.FOLDER_ICON; } } else { icon = IconUtilEx.getIcon(presentableFile, 0, null); } } } else { icon = AllIcons.Nodes.PpInvalid; } } else { icon = AllIcons.Nodes.PpInvalid; } return icon; }