AnAction (@NotNull ActionManager actionManager, @NotNull String actionId, @NotNull AnAction anAction, @NotNull Map<String, AnAction> map) { AnAction action = actionManager.getAction(actionId); if (action == null) { actionManager.registerAction(actionId, anAction); map.put(actionId, anAction); action = anAction; } return action; }