List<ActivateToolWindowAction> (@NotNull Project project, boolean shouldSkipShown) { ActionManager actionManager = ActionManager.getInstance(); ToolWindowManagerEx manager = ToolWindowManagerEx.getInstanceEx(project); List<ActivateToolWindowAction> result = new ArrayList<>(); for (ToolWindow window : manager.getToolWindows()) { if (shouldSkipShown && window.isShowStripeButton() && window.isAvailable() && manager.isStripeButtonShow(window)) { continue; } String actionId = ActivateToolWindowAction.getActionIdForToolWindow(window.getId()); AnAction action = actionManager.getAction(actionId); if (action instanceof ActivateToolWindowAction) { result.add((ActivateToolWindowAction)action); } } AnAction activateGroup = actionManager.getAction("ActivateToolWindowActions"); if (activateGroup instanceof ActionGroup) { AnAction[] children = ((ActionGroup)activateGroup).getChildren(null); for (AnAction child : children) { if (child instanceof ActivateToolWindowAction && !result.contains(child)) { String windowId = ((ActivateToolWindowAction)child).getToolWindowId(); ToolWindow window = manager.getToolWindow(windowId); if (window != null && window.isShowStripeButton() && shouldSkipShown && manager.isStripeButtonShow(window)) { continue; } result.add((ActivateToolWindowAction) child); } } } result.sort(getActionComparator()); return result; }