AnAction (@NotNull String actionId) { AnAction action = ActionManager.getInstance().getAction(actionId); if (action == null) throw new IllegalArgumentException("No action found with id='" + actionId + "'"); return action instanceof ActionGroup ? new ActionGroupWrapper((ActionGroup)action) : new AnActionWrapper(action); }