mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
HighlightingPassFactory: dynamic
GitOrigin-RevId: fb597df75e5be929364524279ddac5fb6927342c
This commit is contained in:
committed by
intellij-monorepo-bot
parent
064f44cb73
commit
ccee533c85
+23
-1
@@ -4,7 +4,9 @@ package com.intellij.codeInsight.daemon.impl;
|
||||
import com.intellij.codeHighlighting.*;
|
||||
import com.intellij.openapi.editor.Document;
|
||||
import com.intellij.openapi.editor.Editor;
|
||||
import com.intellij.openapi.extensions.ExtensionPointListener;
|
||||
import com.intellij.openapi.extensions.ExtensionPointName;
|
||||
import com.intellij.openapi.extensions.PluginDescriptor;
|
||||
import com.intellij.openapi.project.DumbService;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.psi.PsiCompiledElement;
|
||||
@@ -36,8 +38,28 @@ public class TextEditorHighlightingPassRegistrarImpl extends TextEditorHighlight
|
||||
public TextEditorHighlightingPassRegistrarImpl(@NotNull Project project) {
|
||||
myProject = project;
|
||||
|
||||
registerFactories();
|
||||
|
||||
EP_NAME.addExtensionPointListener(new ExtensionPointListener<TextEditorHighlightingPassFactoryRegistrar>() {
|
||||
@Override
|
||||
public void extensionAdded(@NotNull TextEditorHighlightingPassFactoryRegistrar factoryRegistrar,
|
||||
@NotNull PluginDescriptor pluginDescriptor) {
|
||||
factoryRegistrar.registerHighlightingPassFactory(TextEditorHighlightingPassRegistrarImpl.this, project);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void extensionRemoved(@NotNull TextEditorHighlightingPassFactoryRegistrar factoryRegistrar,
|
||||
@NotNull PluginDescriptor pluginDescriptor) {
|
||||
myRegisteredPassFactories.clear();
|
||||
myDirtyScopeTrackingFactories.clear();
|
||||
registerFactories();
|
||||
}
|
||||
}, myProject);
|
||||
}
|
||||
|
||||
public void registerFactories() {
|
||||
for (TextEditorHighlightingPassFactoryRegistrar factoryRegistrar : EP_NAME.getExtensionList()) {
|
||||
factoryRegistrar.registerHighlightingPassFactory(this, project);
|
||||
factoryRegistrar.registerHighlightingPassFactory(this, myProject);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<xi:include href="/META-INF/FormatterExtensionPoints.xml" xpointer="xpointer(/idea-plugin/extensionPoints/*)"/>
|
||||
<xi:include href="/META-INF/EditorExtensionPoints.xml" xpointer="xpointer(/idea-plugin/extensionPoints/*)"/>
|
||||
|
||||
<extensionPoint name="highlightingPassFactory" interface="com.intellij.codeHighlighting.TextEditorHighlightingPassFactoryRegistrar"/>
|
||||
<extensionPoint name="highlightingPassFactory" interface="com.intellij.codeHighlighting.TextEditorHighlightingPassFactoryRegistrar" dynamic="true"/>
|
||||
|
||||
<!--configurables?-->
|
||||
<extensionPoint name="errorOptionsProvider" beanClass="com.intellij.profile.codeInspection.ui.ErrorOptionsProviderEP" dynamic="true">
|
||||
|
||||
Reference in New Issue
Block a user