[NewUI] introduce iconMapper EP

GitOrigin-RevId: af8fc6bedaf67ade0fe0486a2906d76ecc4f1447
This commit is contained in:
Konstantin Bulenkov
2022-06-11 22:02:36 +00:00
committed by intellij-monorepo-bot
parent 18f193dd15
commit 674a0b232f
2 changed files with 32 additions and 0 deletions
@@ -0,0 +1,31 @@
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.ide.ui;
import com.intellij.openapi.extensions.ExtensionPointName;
import com.intellij.openapi.extensions.PluginAware;
import com.intellij.openapi.extensions.PluginDescriptor;
import com.intellij.openapi.extensions.RequiredElement;
import com.intellij.util.xmlb.annotations.Attribute;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
/**
* @author Konstantin Bulenkov
*/
public class IconMapperBean implements PluginAware {
public static final ExtensionPointName<IconMapperBean> EP_NAME = ExtensionPointName.create("com.intellij.iconMapper");
private ClassLoader pluginClassLoader;
@Attribute("mappingFile")
@RequiredElement
public @NonNls String mappingFile;
public ClassLoader getPluginClassLoader() {
return pluginClassLoader;
}
@Override
public void setPluginDescriptor(@NotNull PluginDescriptor pluginDescriptor) {
pluginClassLoader = pluginDescriptor.getPluginClassLoader();
}
}
@@ -386,6 +386,7 @@
<extensionPoint name="lafProvider" interface="com.intellij.ide.ui.LafProvider"/>
<extensionPoint name="dateTimeFormatter" beanClass="com.intellij.util.text.DateTimeFormatterBean" dynamic="true"/>
<extensionPoint name="themeMetadataProvider" beanClass="com.intellij.ide.ui.UIThemeMetadataProvider" dynamic="true"/>
<extensionPoint name="iconMapper" beanClass="com.intellij.ide.ui.IconMapperBean" dynamic="true"/>
<extensionPoint name="tree.CustomLanguageASTComparator" beanClass="com.intellij.lang.LanguageExtensionPoint" dynamic="true">
<with attribute="implementationClass" implements="com.intellij.psi.tree.CustomLanguageASTComparator"/>