Resource Types/Fixes
This commit is contained in:
parent
39233ca3eb
commit
29c237bed4
4 changed files with 10 additions and 7 deletions
|
@ -58,7 +58,7 @@ public class ResourceListIconRenderer extends DefaultTreeCellRenderer
|
||||||
|| nameOG.equals("LICENSE")
|
|| nameOG.equals("LICENSE")
|
||||||
|| nameOG.equals("NOTICE")))
|
|| nameOG.equals("NOTICE")))
|
||||||
{
|
{
|
||||||
setIcon(IconResources.configIcon);
|
setIcon(IconResources.textIcon);
|
||||||
iconSet = true;
|
iconSet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -114,8 +114,8 @@ public class ResourceListIconRenderer extends DefaultTreeCellRenderer
|
||||||
}
|
}
|
||||||
|
|
||||||
//unknown files
|
//unknown files
|
||||||
else if (knownResourceType == null)
|
else if (knownResourceType == null && !iconSet)
|
||||||
setIcon(IconResources.fileIcon);
|
setIcon(IconResources.unknownFileIcon);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -62,7 +62,7 @@ public class IconResources
|
||||||
public static ImageIcon packagesIcon;
|
public static ImageIcon packagesIcon;
|
||||||
public static ImageIcon folderIcon;
|
public static ImageIcon folderIcon;
|
||||||
public static ImageIcon androidIcon;
|
public static ImageIcon androidIcon;
|
||||||
public static ImageIcon fileIcon;
|
public static ImageIcon unknownFileIcon;
|
||||||
public static ImageIcon textIcon;
|
public static ImageIcon textIcon;
|
||||||
public static ImageIcon classIcon;
|
public static ImageIcon classIcon;
|
||||||
public static ImageIcon imageIcon;
|
public static ImageIcon imageIcon;
|
||||||
|
@ -93,7 +93,7 @@ public class IconResources
|
||||||
packagesIcon = new ImageIcon(Objects.requireNonNull(IconResources.class.getResource("/gui/package.png")));
|
packagesIcon = new ImageIcon(Objects.requireNonNull(IconResources.class.getResource("/gui/package.png")));
|
||||||
folderIcon = new ImageIcon(Objects.requireNonNull(IconResources.class.getResource("/gui/folder.png")));
|
folderIcon = new ImageIcon(Objects.requireNonNull(IconResources.class.getResource("/gui/folder.png")));
|
||||||
androidIcon = new ImageIcon(Objects.requireNonNull(IconResources.class.getResource("/gui/android.png")));
|
androidIcon = new ImageIcon(Objects.requireNonNull(IconResources.class.getResource("/gui/android.png")));
|
||||||
fileIcon = new ImageIcon(Objects.requireNonNull(IconResources.class.getResource("/gui/file.png")));
|
unknownFileIcon = new ImageIcon(Objects.requireNonNull(IconResources.class.getResource("/gui/file.png")));
|
||||||
textIcon = new ImageIcon(Objects.requireNonNull(IconResources.class.getResource("/gui/text.png")));
|
textIcon = new ImageIcon(Objects.requireNonNull(IconResources.class.getResource("/gui/text.png")));
|
||||||
classIcon = new ImageIcon(Objects.requireNonNull(IconResources.class.getResource("/gui/class.png")));
|
classIcon = new ImageIcon(Objects.requireNonNull(IconResources.class.getResource("/gui/class.png")));
|
||||||
imageIcon = new ImageIcon(Objects.requireNonNull(IconResources.class.getResource("/gui/image.png")));
|
imageIcon = new ImageIcon(Objects.requireNonNull(IconResources.class.getResource("/gui/image.png")));
|
||||||
|
|
|
@ -19,7 +19,8 @@ public enum ResourceType
|
||||||
ANDROID_ARCHIVE(IconResources.androidIcon, "apk", "wapk", "dex"),
|
ANDROID_ARCHIVE(IconResources.androidIcon, "apk", "wapk", "dex"),
|
||||||
IMAGE_FILE(IconResources.imageIcon, "png", "jpg", "jpeg", "bmp", "wbmp", "gif", "tif"),
|
IMAGE_FILE(IconResources.imageIcon, "png", "jpg", "jpeg", "bmp", "wbmp", "gif", "tif"),
|
||||||
CONFIG_TEXT_FILE(IconResources.configIcon, "properties", "xml", "jsp", "mf", "config",
|
CONFIG_TEXT_FILE(IconResources.configIcon, "properties", "xml", "jsp", "mf", "config",
|
||||||
"csv", "yaml", "ini", "json", "sql", "gradle", "dockerfile", "htaccess"),
|
"csv", "yml", "yaml", "ini", "json", "sql", "gradle", "dockerfile", "htaccess",
|
||||||
|
"plugin", "attachprovider", "transportservice", "connector"),
|
||||||
JAVA_FILE(IconResources.javaIcon, "java"),
|
JAVA_FILE(IconResources.javaIcon, "java"),
|
||||||
TEXT_FILE(IconResources.textIcon, "txt", "md", "log", "html", "css"),
|
TEXT_FILE(IconResources.textIcon, "txt", "md", "log", "html", "css"),
|
||||||
CPP_FILE(IconResources.cplusplusIcon, "c", "cpp", "h"),
|
CPP_FILE(IconResources.cplusplusIcon, "c", "cpp", "h"),
|
||||||
|
|
|
@ -34,7 +34,9 @@ public enum SyntaxLanguage
|
||||||
HTML(SyntaxConstants.SYNTAX_STYLE_HTML, (n, c) -> n.endsWith(".html")),
|
HTML(SyntaxConstants.SYNTAX_STYLE_HTML, (n, c) -> n.endsWith(".html")),
|
||||||
CSS(SyntaxConstants.SYNTAX_STYLE_CSS, (n, c) -> n.endsWith(".css")),
|
CSS(SyntaxConstants.SYNTAX_STYLE_CSS, (n, c) -> n.endsWith(".css")),
|
||||||
PROPERTIES(SyntaxConstants.SYNTAX_STYLE_PROPERTIES_FILE,
|
PROPERTIES(SyntaxConstants.SYNTAX_STYLE_PROPERTIES_FILE,
|
||||||
(n, c) -> n.endsWith(".properties") || n.endsWith(".mf") || n.endsWith(".sf")),
|
(n, c) -> n.endsWith(".properties") || n.endsWith(".mf") || n.endsWith(".sf")
|
||||||
|
|| n.endsWith(".plugin") || n.endsWith(".attachprovider") || n.endsWith(".transportservice")
|
||||||
|
|| n.endsWith(".connector")),
|
||||||
PHP(SyntaxConstants.SYNTAX_STYLE_PHP, (n, c) -> n.endsWith(".php") || c.startsWith("<?php")),
|
PHP(SyntaxConstants.SYNTAX_STYLE_PHP, (n, c) -> n.endsWith(".php") || c.startsWith("<?php")),
|
||||||
JS(SyntaxConstants.SYNTAX_STYLE_JAVASCRIPT, (n, c) -> n.endsWith(".js")),
|
JS(SyntaxConstants.SYNTAX_STYLE_JAVASCRIPT, (n, c) -> n.endsWith(".js")),
|
||||||
BATCH(SyntaxConstants.SYNTAX_STYLE_WINDOWS_BATCH, (n, c) -> n.endsWith(".bat")),
|
BATCH(SyntaxConstants.SYNTAX_STYLE_WINDOWS_BATCH, (n, c) -> n.endsWith(".bat")),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue