private static void patchRootAreaExtensions() { ExtensionsArea rootArea = Extensions.getArea(null); 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); } } }
private static void patchProjectAreaExtensions(@NotNull final Project project) { ExtensionsArea projectArea = Extensions.getArea(project); for (SelectInTarget target : Extensions.getExtensions(SelectInTarget.EP_NAME, project)) { if (ToolWindowId.FAVORITES_VIEW.equals(target.getToolWindowId()) || ToolWindowId.STRUCTURE_VIEW.equals(target.getToolWindowId())) { projectArea.getExtensionPoint(SelectInTarget.EP_NAME).unregisterExtension(target); } } for (AbstractProjectViewPane pane : Extensions.getExtensions(AbstractProjectViewPane.EP_NAME, project)) { if (pane.getId().equals(ScopeViewPane.ID)) { Disposer.dispose(pane); projectArea.getExtensionPoint(AbstractProjectViewPane.EP_NAME).unregisterExtension(pane); } } }
private static void patchProjectAreaExtensions(@NotNull final Project project) { Executor debugExecutor = DefaultDebugExecutor.getDebugExecutorInstance(); unregisterAction(debugExecutor.getId(), ExecutorRegistryImpl.RUNNERS_GROUP); unregisterAction(debugExecutor.getContextActionId(), ExecutorRegistryImpl.RUN_CONTEXT_GROUP); ExtensionsArea projectArea = Extensions.getArea(project); for (SelectInTarget target : Extensions.getExtensions(SelectInTarget.EP_NAME, project)) { if (ToolWindowId.FAVORITES_VIEW.equals(target.getToolWindowId()) || ToolWindowId.STRUCTURE_VIEW.equals(target.getToolWindowId())) { projectArea.getExtensionPoint(SelectInTarget.EP_NAME).unregisterExtension(target); } } for (AbstractProjectViewPane pane : Extensions.getExtensions(AbstractProjectViewPane.EP_NAME, project)) { if (pane.getId().equals(ScopeViewPane.ID)) { Disposer.dispose(pane); projectArea.getExtensionPoint(AbstractProjectViewPane.EP_NAME).unregisterExtension(pane); } } }