void (KeymapGroup group, AnAction action, ActionManager actionManager, Condition<? super AnAction> filtered, boolean forceNonPopup, boolean skipUnnamedGroups) { if (action instanceof ActionGroup) { if (forceNonPopup || skipUnnamedGroups) { String text = action.getTemplateText(); boolean skip = forceNonPopup || StringUtil.isEmpty(text); KeymapGroup tgtGroup; if (skip) { tgtGroup = group; } else { tgtGroup = new Group(text, actionManager.getId(action), action.getTemplatePresentation().getIcon()); group.addGroup(tgtGroup); } AnAction[] actions = getActions((ActionGroup)action, actionManager); for (AnAction childAction : actions) { addAction(tgtGroup, childAction, actionManager, filtered, forceNonPopup, skipUnnamedGroups); } ((Group)tgtGroup).normalizeSeparators(); } else { Group subGroup = createGroup((ActionGroup)action, false, filtered); if (subGroup.getSize() > 0) { group.addGroup(subGroup); } } } else if (action instanceof Separator) { if (group instanceof Group && (filtered == null || filtered.value(action))) { ((Group)group).addSeparator(); } } else { if (filtered == null || filtered.value(action)) { String id = actionManager.getId(action); if (id != null) group.addActionId(id); } } }