void (@NotNull AnActionEvent e) { if (!isEnabled(e)) { e.getPresentation().setEnabled(false); return; } final AnAction[] actions = getChildren(e); for (final AnAction action : actions) { e.getPresentation().setEnabled(true); action.update(e); if (e.getPresentation().isEnabled()) { break; } } if (actions.length == 1) { e.getPresentation().setText(actions[0].getTemplatePresentation().getText()); } else { final String actionText = getActionText(e); if (!actionText.endsWith("...")) { e.getPresentation().setText(actionText + (actions.length > 1 ? "..." : "")); } } e.getPresentation().setIcon(AllIcons.General.Add); }