From 5d16f5e090887432b2bfa1d3034aa841208db935 Mon Sep 17 00:00:00 2001 From: Mikhail Golubev Date: Tue, 5 Jul 2022 12:02:45 +0300 Subject: [PATCH] [ExpUI] Register an iconMapper to override Python file type icon Previously, the mapping file was put in a wrong place (not at the root of a "resources" directory) and was not registered in any plugin descriptor. However, under debug, the right icon was still displayed because pythonFile.svg is also remapped in all-platform PlatformIconMappings.json. In actual installers pythonFile.svg and PlatformIconMappings.json end up in different classloaders, so this fallback doesn't work. GitOrigin-RevId: ee361cd7d2d0158b0cc96bd652a5cb53bb7d88c5 --- python/python-psi-api/resources/META-INF/PythonPsi.xml | 1 + .../pythonIconMappings.json => PythonPsiApiIconMappings.json} | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) rename python/python-psi-api/resources/{icons/com/jetbrains/python/pythonIconMappings.json => PythonPsiApiIconMappings.json} (99%) diff --git a/python/python-psi-api/resources/META-INF/PythonPsi.xml b/python/python-psi-api/resources/META-INF/PythonPsi.xml index cfd0af9f57b7..cc455adc1a3d 100644 --- a/python/python-psi-api/resources/META-INF/PythonPsi.xml +++ b/python/python-psi-api/resources/META-INF/PythonPsi.xml @@ -49,6 +49,7 @@ hashBangs="python" implementationClass="com.jetbrains.python.PythonFileType" fieldName="INSTANCE"/> + diff --git a/python/python-psi-api/resources/icons/com/jetbrains/python/pythonIconMappings.json b/python/python-psi-api/resources/PythonPsiApiIconMappings.json similarity index 99% rename from python/python-psi-api/resources/icons/com/jetbrains/python/pythonIconMappings.json rename to python/python-psi-api/resources/PythonPsiApiIconMappings.json index 65167ce9c3d5..1a36192caa3f 100644 --- a/python/python-psi-api/resources/icons/com/jetbrains/python/pythonIconMappings.json +++ b/python/python-psi-api/resources/PythonPsiApiIconMappings.json @@ -5,7 +5,6 @@ "python": { "expui": { "python.svg": "icons/com/jetbrains/python/pythonFile.svg" - } } }