void (@NotNull ToolWindow toolWindow, @NotNull ActionManager actionManager) { String actionId = getActionIdForToolWindow(toolWindow.getId()); AnAction action = actionManager.getAction(actionId); if (action == null) { actionManager.registerAction(actionId, new ActivateToolWindowAction(toolWindow.getId())); } }