@TestOnly
  public synchronized void initExecutorActions(@NotNull Executor executor, @NotNull ActionRuntimeRegistrar actionRegistrar) {
    if (contextActionIdSet.contains(executor.getContextActionId())) {
      LOG.error("Executor with context action id: \"" + executor.getContextActionId() + "\" was already registered!");
    }

    AnAction toolbarAction;
    AnAction runContextAction;
    AnAction runNonExistingContextAction;
    if (executor instanceof ExecutorGroup<?> executorGroup) {
      String delegateId = executor.getId() + "_delegate";
      ExecutorGroupActionGroup actionGroup = new ExecutorGroupActionGroup(executorGroup, ExecutorAction::new);
      registerAction(actionRegistrar, delegateId, actionGroup, idToAction);

      ActionGroup toolbarActionGroup = new SplitButtonAction(actionGroup);
      Presentation presentation = toolbarActionGroup.getTemplatePresentation();
      presentation.setIconSupplier(executor::getIcon);
      presentation.setText(executor.getStartActionText());
      presentation.setDescription(executor.getDescription());
      toolbarAction = toolbarActionGroup;
      runContextAction = new ExecutorGroupActionGroup(executorGroup, RunContextAction::new);
      runNonExistingContextAction = new ExecutorGroupActionGroup(executorGroup, RunNewConfigurationContextAction::new);
    }
    else {
      toolbarAction = new ExecutorAction(executor);
      runContextAction = new RunContextAction(executor);
      runNonExistingContextAction = new RunNewConfigurationContextAction(executor);
    }

    registerActionInGroup(actionRegistrar, executor.getId(), toolbarAction, RUNNERS_GROUP, idToAction);

    AnAction action = registerAction(actionRegistrar, executor.getContextActionId(), runContextAction, contextActionIdToAction);
    if (isExecutorInMainGroup(executor)) {
      DefaultActionGroup group = Objects.requireNonNull((DefaultActionGroup)actionRegistrar.getActionOrStub(RUN_CONTEXT_EXECUTORS_GROUP));
      actionRegistrar.addToGroup(group, action, Constraints.LAST);
    }
    else {
      DefaultActionGroup group = Objects.requireNonNull((DefaultActionGroup)actionRegistrar.getActionOrStub(RUN_CONTEXT_GROUP_MORE));
      actionRegistrar.addToGroup(group, action, new Constraints(Anchor.BEFORE, "CreateRunConfiguration"));
    }

    AnAction nonExistingAction = registerAction(actionRegistrar, newConfigurationContextActionId(executor), runNonExistingContextAction,
                                                contextActionIdToAction);
    DefaultActionGroup group = Objects.requireNonNull((DefaultActionGroup)actionRegistrar.getActionOrStub(RUN_CONTEXT_GROUP_MORE));
    actionRegistrar.addToGroup(group, nonExistingAction, new Constraints(Anchor.BEFORE, "CreateNewRunConfiguration"));

    initRunToolbarExecutorActions(executor, actionRegistrar);

    contextActionIdSet.add(executor.getContextActionId());
  }
@TestOnly
  public synchronized void initExecutorActions(@NotNull Executor executor, @NotNull ActionRuntimeRegistrar actionRegistrar)