Search in sources :

Example 1 with IntentionActionBean

use of com.intellij.codeInsight.intention.IntentionActionBean in project intellij-community by JetBrains.

the class PyCharmEduInitialConfigurator method patchRootAreaExtensions.

private static void patchRootAreaExtensions() {
    ExtensionsArea rootArea = Extensions.getArea(null);
    rootArea.unregisterExtensionPoint("com.intellij.runLineMarkerContributor");
    for (ToolWindowEP ep : Extensions.getExtensions(ToolWindowEP.EP_NAME)) {
        if (ToolWindowId.FAVORITES_VIEW.equals(ep.id) || ToolWindowId.TODO_VIEW.equals(ep.id) || EventLog.LOG_TOOL_WINDOW_ID.equals(ep.id) || ToolWindowId.STRUCTURE_VIEW.equals(ep.id)) {
            rootArea.getExtensionPoint(ToolWindowEP.EP_NAME).unregisterExtension(ep);
        }
    }
    for (DirectoryProjectConfigurator ep : Extensions.getExtensions(DirectoryProjectConfigurator.EP_NAME)) {
        if (ep instanceof PlatformProjectViewOpener) {
            rootArea.getExtensionPoint(DirectoryProjectConfigurator.EP_NAME).unregisterExtension(ep);
        }
    }
    // unregister unrelated tips
    for (TipAndTrickBean tip : Extensions.getExtensions(TipAndTrickBean.EP_NAME)) {
        if (UNRELATED_TIPS.contains(tip.fileName)) {
            rootArea.getExtensionPoint(TipAndTrickBean.EP_NAME).unregisterExtension(tip);
        }
    }
    for (IntentionActionBean ep : Extensions.getExtensions(IntentionManager.EP_INTENTION_ACTIONS)) {
        if ("org.intellij.lang.regexp.intention.CheckRegExpIntentionAction".equals(ep.className)) {
            rootArea.getExtensionPoint(IntentionManager.EP_INTENTION_ACTIONS).unregisterExtension(ep);
        }
    }
    final ExtensionPoint<ProjectAttachProcessor> point = Extensions.getRootArea().getExtensionPoint(ProjectAttachProcessor.EP_NAME);
    for (ProjectAttachProcessor attachProcessor : Extensions.getExtensions(ProjectAttachProcessor.EP_NAME)) {
        point.unregisterExtension(attachProcessor);
    }
}
Also used : ProjectAttachProcessor(com.intellij.projectImport.ProjectAttachProcessor) ExtensionsArea(com.intellij.openapi.extensions.ExtensionsArea) DirectoryProjectConfigurator(com.intellij.platform.DirectoryProjectConfigurator) TipAndTrickBean(com.intellij.ide.util.TipAndTrickBean) IntentionActionBean(com.intellij.codeInsight.intention.IntentionActionBean) PlatformProjectViewOpener(com.intellij.platform.PlatformProjectViewOpener)

Aggregations

IntentionActionBean (com.intellij.codeInsight.intention.IntentionActionBean)1 TipAndTrickBean (com.intellij.ide.util.TipAndTrickBean)1 ExtensionsArea (com.intellij.openapi.extensions.ExtensionsArea)1 DirectoryProjectConfigurator (com.intellij.platform.DirectoryProjectConfigurator)1 PlatformProjectViewOpener (com.intellij.platform.PlatformProjectViewOpener)1 ProjectAttachProcessor (com.intellij.projectImport.ProjectAttachProcessor)1