Java Code Examples for com.intellij.openapi.extensions.ExtensionPoint#unregisterExtension()
The following examples show how to use
com.intellij.openapi.extensions.ExtensionPoint#unregisterExtension() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: UsageGroupingRuleProviderOverride.java From intellij with Apache License 2.0 | 5 votes |
@Override public void initComponent() { // remove UsageGroupingRuleProviderImpl from the list of EPs, effectively replacing it with // this class ExtensionPoint<UsageGroupingRuleProvider> ep = Extensions.getRootArea().getExtensionPoint(UsageGroupingRuleProvider.EP_NAME); ep.unregisterExtension(UsageGroupingRuleProviderImpl.class); }
Example 2
Source File: CMakeNotificationFilter.java From intellij with Apache License 2.0 | 5 votes |
public static void overrideProjectExtension(Project project) { ExtensionPoint<EditorNotifications.Provider> ep = Extensions.getArea(project).getExtensionPoint(EDITOR_NOTIFICATIONS_EPNAME); for (EditorNotifications.Provider<?> editorNotificationsProvider : ep.getExtensions()) { if (editorNotificationsProvider instanceof CMakeNotificationProvider) { ep.unregisterExtension(editorNotificationsProvider); } } ep.registerExtension(new CMakeNotificationFilter(project)); }
Example 3
Source File: DelegatingSwitchToHeaderOrSourceProvider.java From intellij with Apache License 2.0 | 5 votes |
@Override public void initComponent() { ExtensionPoint<GotoRelatedProvider> ep = Extensions.getRootArea().getExtensionPoint(GotoRelatedProvider.EP_NAME); for (GotoRelatedProvider provider : ep.getExtensions()) { if (provider.getClass().equals(OCSwitchToHeaderOrSourceRelatedProvider.class)) { ep.unregisterExtension(provider); } } }
Example 4
Source File: ServiceHelper.java From intellij with Apache License 2.0 | 5 votes |
/** Unregister all extensions of the given class, for the given extension point. */ public static <T> void unregisterLanguageExtensionPoint( String extensionPointKey, Class<T> clazz, Disposable parentDisposable) { ExtensionPoint<LanguageExtensionPoint<T>> ep = Extensions.getRootArea().getExtensionPoint(extensionPointKey); LanguageExtensionPoint<T>[] existingExtensions = ep.getExtensions(); for (LanguageExtensionPoint<T> ext : existingExtensions) { if (clazz.getName().equals(ext.implementationClass)) { ep.unregisterExtension(ext); Disposer.register(parentDisposable, () -> ep.registerExtension(ext)); } } }