boolean (DefaultActionGroup group) { if (group.getChildrenCount() == 0) { return false; } for (AnAction action : group.getChildren(null)) { if (action instanceof DefaultActionGroup) { if (isVisible((DefaultActionGroup)action)) { return true; } } else { return true; } } return false; }