void (@NotNull DefaultActionGroup group, @NotNull ActionGroup actionGroup) { for (AnAction action : actionGroup.getChildren(null)) { if (action instanceof ActionGroup && !((ActionGroup)action).isPopup()) { collectAllActions(group, (ActionGroup)action); } else { // add actions group popup as is group.add(action); } } }