private static ActionGroup getToolbarActions(@Nullable RunContentDescriptor descriptor) {
    DefaultActionGroup actionGroup = new DefaultActionGroup();
    actionGroup.add(ActionManager.getInstance().getAction(RUN_DASHBOARD_CONTENT_TOOLBAR));

    List<AnAction> leftToolbarActions = null;
    RunnerLayoutUiImpl ui = RunDashboardManagerImpl.getRunnerLayoutUi(descriptor);
    if (ui != null) {
      leftToolbarActions = ui.getActions();
    }
    else {
      ActionToolbar toolbar = RunDashboardManagerImpl.findActionToolbar(descriptor);
      if (toolbar != null) {
        leftToolbarActions = toolbar.getActions();
      }
    }

    if (leftToolbarActions != null) {
      if (leftToolbarActions.size() == 1 && leftToolbarActions.get(0) instanceof ActionGroup) {
        leftToolbarActions = Arrays.asList(((ActionGroup)leftToolbarActions.get(0)).getChildren(null));
      }
      for (AnAction action : leftToolbarActions) {
        if (action instanceof MoreActionGroup) {
          actionGroup.add(getServicesMoreActionGroup((MoreActionGroup)action, descriptor));
        }
        else if (!(action instanceof StopAction) && !(action instanceof FakeRerunAction) && !(action instanceof ExecutorAction)) {
          actionGroup.add(action);
        }
      }
    }
    return actionGroup;
  }
private static ActionGroup getToolbarActions(@Nullable RunContentDescriptor descriptor)