From 9e18d5fae60982f606c415fe4d2f673f6d3682b7 Mon Sep 17 00:00:00 2001 From: Kirill Kirichenko Date: Tue, 27 Nov 2018 10:55:39 +0300 Subject: [PATCH] IDEA-202038 Update icons and get rid of unused icons --- .../gen/icons/RegExpSupportIcons.java | 21 ------------------ .../lang/regexp/regexp-filetype-icon.png | Bin 385 -> 0 bytes .../intellij/lang/regexp/RegExpFileType.java | 10 +-------- images/resources/META-INF/ImagesPlugin.xml | 1 - .../intellij/images/icons/EditExternally.png | Bin 255 -> 0 bytes images/src/icons/ImagesIcons.java | 1 - platform/icons/src/fileTypes/regexp.svg | 8 +++++++ .../icons/src/nodes}/editorconfig.svg | 0 .../util/src/com/intellij/icons/AllIcons.java | 2 ++ .../src/icons/EditorconfigIcons.java | 1 - .../actions/CreateEditorConfigFileAction.kt | 4 ++-- .../language/filetype/EditorConfigFileType.kt | 4 ++-- .../EditorConfigColorSettingsPage.kt | 4 ++-- .../intellij/lang/xpath/xslt/XsltSupport.java | 3 +-- 14 files changed, 18 insertions(+), 41 deletions(-) delete mode 100644 RegExpSupport/gen/icons/RegExpSupportIcons.java delete mode 100644 RegExpSupport/resources/org/intellij/lang/regexp/regexp-filetype-icon.png delete mode 100644 images/resources/org/intellij/images/icons/EditExternally.png create mode 100644 platform/icons/src/fileTypes/regexp.svg rename {plugins/editorconfig/resources/icons => platform/icons/src/nodes}/editorconfig.svg (100%) diff --git a/RegExpSupport/gen/icons/RegExpSupportIcons.java b/RegExpSupport/gen/icons/RegExpSupportIcons.java deleted file mode 100644 index e03dcfd291d2..000000000000 --- a/RegExpSupport/gen/icons/RegExpSupportIcons.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. - */ - -package icons; - -import com.intellij.openapi.util.IconLoader; - -import javax.swing.*; - -/** - * NOTE THIS FILE IS AUTO-GENERATED - * DO NOT EDIT IT BY HAND, run "Generate icon classes" configuration instead - */ -public final class RegExpSupportIcons { - private static Icon load(String path) { - return IconLoader.getIcon(path, RegExpSupportIcons.class); - } - - public static final Icon Regexp_filetype_icon = load("/org/intellij/lang/regexp/regexp-filetype-icon.png"); // 11x16 -} diff --git a/RegExpSupport/resources/org/intellij/lang/regexp/regexp-filetype-icon.png b/RegExpSupport/resources/org/intellij/lang/regexp/regexp-filetype-icon.png deleted file mode 100644 index f3cd301d7932a8523123fd3960c59e36837958d7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 385 zcmeAS@N?(olHy`uVBq!ia0vp^+(0bA!3-q7CztvFsa*j+A+A9B_3QgU^y<~!*RStA zdv+Dbc<|uZoH;5$#+^HNCQVX#`0(M~yT=|pxCi6{*$xhxZ{9qZH&1u|e6i=x8OzF; zE?+)5eLBHT}I_V!R$ zSJ8(L87^LAx^Y9ap@H?piQ`wUFuA$u*Vl_3Kh9WN%XIeanXWFKckj3i40!YN!yO$> z9z3|OudiorZhq#>87nI$b92q7a|@0GT`yP?9O!Vtl-pa3)U%z^JsrGP2 z03}mBT^vI=WLXa~GchqTFl>k|i`|yH`+xmvUKSvi!C{sH!y*?YhNp#3FEMaDLoip*0qoqJY%@h_F;oXuC?mAu|7^Xc%@ti7Du18&IYeRt=ukzW6OIY)yK a(3F2QF6<|Z#T}La*$kepelF{r5}E)9ovZW! diff --git a/RegExpSupport/src/org/intellij/lang/regexp/RegExpFileType.java b/RegExpSupport/src/org/intellij/lang/regexp/RegExpFileType.java index e0e480035bd2..eef174312c43 100644 --- a/RegExpSupport/src/org/intellij/lang/regexp/RegExpFileType.java +++ b/RegExpSupport/src/org/intellij/lang/regexp/RegExpFileType.java @@ -18,9 +18,6 @@ package org.intellij.lang.regexp; import com.intellij.icons.AllIcons; import com.intellij.lang.Language; import com.intellij.openapi.fileTypes.LanguageFileType; -import com.intellij.openapi.util.IconLoader; -import com.intellij.ui.LayeredIcon; -import icons.RegExpSupportIcons; import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -34,12 +31,7 @@ public class RegExpFileType extends LanguageFileType { private RegExpFileType() { super(RegExpLanguage.INSTANCE); - myIcon = new IconLoader.LazyIcon() { - @Override - protected Icon compute() { - return new LayeredIcon(AllIcons.FileTypes.Text, RegExpSupportIcons.Regexp_filetype_icon); - } - }; + myIcon = AllIcons.FileTypes.Regexp; } public RegExpFileType(@NotNull Language language) { diff --git a/images/resources/META-INF/ImagesPlugin.xml b/images/resources/META-INF/ImagesPlugin.xml index 35020fd46be4..37e0aeae75df 100644 --- a/images/resources/META-INF/ImagesPlugin.xml +++ b/images/resources/META-INF/ImagesPlugin.xml @@ -29,7 +29,6 @@ diff --git a/images/resources/org/intellij/images/icons/EditExternally.png b/images/resources/org/intellij/images/icons/EditExternally.png deleted file mode 100644 index 12200439d0527043435b395ac339fa66ab8b6eda..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 255 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`$2?seLn>}1|M>skp4n)gar(J> zrX6w}j;{{9l00GXK<$jc4#v>X(Ekf77$-Tg=}4&Pu^zeZ*rp)OaNI?L;rNZ14MJ)! z4Kw+fdEz}doDSaLIZ(hDvRO~ye}7L8OXeT`BfEC+H0(^^-o!Zh7W4o8aq{2m^WzUx z3e@gB_R!u_k7HHV&;7ZPZ~q?(*uT7gnd@JBxx~NoCvcZ3NG}N9!Qt}%{0IJB{GSfl ziF03yap+<+5MLu7qsNdKAacmyT!}+c+z + + + + + + + diff --git a/plugins/editorconfig/resources/icons/editorconfig.svg b/platform/icons/src/nodes/editorconfig.svg similarity index 100% rename from plugins/editorconfig/resources/icons/editorconfig.svg rename to platform/icons/src/nodes/editorconfig.svg diff --git a/platform/util/src/com/intellij/icons/AllIcons.java b/platform/util/src/com/intellij/icons/AllIcons.java index 3e5d9c1f5916..c8f905926604 100644 --- a/platform/util/src/com/intellij/icons/AllIcons.java +++ b/platform/util/src/com/intellij/icons/AllIcons.java @@ -796,6 +796,7 @@ public class AllIcons { public static final Icon Jspx = IconLoader.getIcon("/fileTypes/jspx.svg"); // 16x16 public static final Icon Manifest = IconLoader.getIcon("/fileTypes/manifest.svg"); // 16x16 public static final Icon Properties = IconLoader.getIcon("/fileTypes/properties.svg"); // 16x16 + public static final Icon Regexp = IconLoader.getIcon("/fileTypes/regexp.svg"); // 16x16 public static final Icon Text = IconLoader.getIcon("/fileTypes/text.svg"); // 16x16 public static final Icon UiForm = IconLoader.getIcon("/fileTypes/uiForm.svg"); // 16x16 public static final Icon Unknown = IconLoader.getIcon("/fileTypes/unknown.svg"); // 16x16 @@ -1859,6 +1860,7 @@ public class AllIcons { public static final Icon DataView = IconLoader.getIcon("/nodes/dataView.svg"); // 16x16 public static final Icon Deploy = IconLoader.getIcon("/nodes/deploy.svg"); // 16x16 public static final Icon Desktop = IconLoader.getIcon("/nodes/desktop.svg"); // 16x16 + public static final Icon Editorconfig = IconLoader.getIcon("/nodes/editorconfig.svg"); // 16x16 public static final Icon Ejb = IconLoader.getIcon("/nodes/ejb.svg"); // 16x16 public static final Icon EjbBusinessMethod = IconLoader.getIcon("/nodes/ejbBusinessMethod.svg"); // 16x16 public static final Icon EjbCmpField = IconLoader.getIcon("/nodes/ejbCmpField.svg"); // 16x16 diff --git a/plugins/editorconfig/src/icons/EditorconfigIcons.java b/plugins/editorconfig/src/icons/EditorconfigIcons.java index f32159ef3317..ce34b33c448a 100644 --- a/plugins/editorconfig/src/icons/EditorconfigIcons.java +++ b/plugins/editorconfig/src/icons/EditorconfigIcons.java @@ -14,7 +14,6 @@ public final class EditorconfigIcons { return IconLoader.getIcon(path, EditorconfigIcons.class); } - public static final Icon Editorconfig = load("/icons/editorconfig.svg"); // 16x16 public static final Icon PartiallyOverridden = load("/icons/partiallyOverridden.svg"); // 12x12 public static final Icon PartiallyOverriding = load("/icons/partiallyOverriding.svg"); // 12x12 } diff --git a/plugins/editorconfig/src/org/editorconfig/language/codeinsight/actions/CreateEditorConfigFileAction.kt b/plugins/editorconfig/src/org/editorconfig/language/codeinsight/actions/CreateEditorConfigFileAction.kt index c8840ba315c7..95e07f4b3b7e 100644 --- a/plugins/editorconfig/src/org/editorconfig/language/codeinsight/actions/CreateEditorConfigFileAction.kt +++ b/plugins/editorconfig/src/org/editorconfig/language/codeinsight/actions/CreateEditorConfigFileAction.kt @@ -1,20 +1,20 @@ // Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.editorconfig.language.codeinsight.actions +import com.intellij.icons.AllIcons import com.intellij.ide.actions.CreateInDirectoryActionBase import com.intellij.openapi.actionSystem.AnActionEvent import com.intellij.openapi.actionSystem.LangDataKeys import com.intellij.openapi.application.runWriteAction import com.intellij.psi.PsiDirectory import com.intellij.psi.PsiFile -import icons.EditorconfigIcons import org.editorconfig.language.filetype.EditorConfigFileConstants import org.editorconfig.language.messages.EditorConfigBundle class CreateEditorConfigFileAction : CreateInDirectoryActionBase( EditorConfigBundle["create.file.title"], EditorConfigBundle["create.file.description"], - EditorconfigIcons.Editorconfig + AllIcons.Nodes.Editorconfig ) { @Suppress("UsePropertyAccessSyntax") override fun actionPerformed(event: AnActionEvent) { diff --git a/plugins/editorconfig/src/org/editorconfig/language/filetype/EditorConfigFileType.kt b/plugins/editorconfig/src/org/editorconfig/language/filetype/EditorConfigFileType.kt index 12248836a761..d100f368e0ff 100644 --- a/plugins/editorconfig/src/org/editorconfig/language/filetype/EditorConfigFileType.kt +++ b/plugins/editorconfig/src/org/editorconfig/language/filetype/EditorConfigFileType.kt @@ -1,8 +1,8 @@ // Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.editorconfig.language.filetype +import com.intellij.icons.AllIcons import com.intellij.openapi.fileTypes.LanguageFileType -import icons.EditorconfigIcons import org.editorconfig.language.EditorConfigLanguage import org.editorconfig.language.messages.EditorConfigBundle import javax.swing.Icon @@ -11,5 +11,5 @@ object EditorConfigFileType : LanguageFileType(EditorConfigLanguage) { override fun getName() = EditorConfigFileConstants.FILETYPE_NAME override fun getDescription() = EditorConfigBundle["file.type.description"] override fun getDefaultExtension() = EditorConfigFileConstants.FILE_EXTENSION - override fun getIcon(): Icon? = EditorconfigIcons.Editorconfig + override fun getIcon(): Icon? = AllIcons.Nodes.Editorconfig } diff --git a/plugins/editorconfig/src/org/editorconfig/language/highlighting/EditorConfigColorSettingsPage.kt b/plugins/editorconfig/src/org/editorconfig/language/highlighting/EditorConfigColorSettingsPage.kt index d52077db1b89..20d258dd76f0 100644 --- a/plugins/editorconfig/src/org/editorconfig/language/highlighting/EditorConfigColorSettingsPage.kt +++ b/plugins/editorconfig/src/org/editorconfig/language/highlighting/EditorConfigColorSettingsPage.kt @@ -1,6 +1,7 @@ // Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.editorconfig.language.highlighting +import com.intellij.icons.AllIcons import com.intellij.openapi.editor.colors.TextAttributesKey import com.intellij.openapi.fileTypes.SyntaxHighlighter import com.intellij.openapi.options.colors.AttributesDescriptor @@ -8,13 +9,12 @@ import com.intellij.openapi.options.colors.ColorDescriptor import com.intellij.openapi.options.colors.ColorSettingsPage import com.intellij.psi.codeStyle.DisplayPriority import com.intellij.psi.codeStyle.DisplayPrioritySortable -import icons.EditorconfigIcons import org.editorconfig.language.filetype.EditorConfigFileConstants import org.editorconfig.language.messages.EditorConfigBundle.get import javax.swing.Icon class EditorConfigColorSettingsPage : ColorSettingsPage, DisplayPrioritySortable { - override fun getIcon(): Icon = EditorconfigIcons.Editorconfig + override fun getIcon(): Icon = AllIcons.Nodes.Editorconfig override fun getHighlighter(): SyntaxHighlighter = EditorConfigSyntaxHighlighter override fun getDemoText() = """root = true diff --git a/plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/xslt/XsltSupport.java b/plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/xslt/XsltSupport.java index cf9cecbd893a..ce0aa3d289df 100644 --- a/plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/xslt/XsltSupport.java +++ b/plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/xslt/XsltSupport.java @@ -25,7 +25,6 @@ import com.intellij.psi.PsiFile; import com.intellij.psi.impl.PsiFileEx; import com.intellij.psi.util.*; import com.intellij.psi.xml.*; -import com.intellij.ui.LayeredIcon; import com.intellij.util.SmartList; import com.intellij.util.xml.NanoXmlUtil; import gnu.trove.THashMap; @@ -349,7 +348,7 @@ public class XsltSupport { } public static Icon createXsltIcon(Icon icon) { - return LayeredIcon.create(icon, XpathIcons.Xslt_filetype_overlay); + return XpathIcons.Xslt_filetype_overlay; } private static class XsltSupportProvider implements ParameterizedCachedValueProvider {