@Override
  public AnAction @NotNull [] createConsoleActions() {
    if (!myViewManager.isBuildContentView()) {
      // console actions should be integrated with the provided toolbar when the console is shown not on Build tw
      return AnAction.EMPTY_ARRAY;
    }
    final DefaultActionGroup rerunActionGroup = new DefaultActionGroup();
    AnAction stopAction = null;
    if (myBuildDescriptor.getProcessHandler() != null) {
      stopAction = new StopProcessAction(IdeBundle.messagePointer("action.DumbAware.BuildView.text.stop"),
                                         IdeBundle.messagePointer("action.DumbAware.CopyrightProfilesPanel.description.stop"),
                                         myBuildDescriptor.getProcessHandler());
      ActionUtil.copyFrom(stopAction, IdeActions.ACTION_STOP_PROGRAM);
      stopAction.registerCustomShortcutSet(stopAction.getShortcutSet(), this);
    }

    ExecutionConsole consoleView = getConsoleView();
    if (consoleView instanceof ConsoleView) {
      consoleView.getComponent(); //create editor to be able to add console editor actions
      if (stopAction == null) {
        final AnAction[] consoleActions = ((ConsoleView)consoleView).createConsoleActions();
        stopAction = ContainerUtil.find(consoleActions, StopAction.class::isInstance);
      }
    }
    final DefaultActionGroup actionGroup = new DefaultActionGroup();
    for (AnAction anAction : myBuildDescriptor.getRestartActions()) {
      rerunActionGroup.add(anAction);
    }

    if (stopAction != null) {
      rerunActionGroup.add(stopAction);
    }
    actionGroup.add(rerunActionGroup);
    final DefaultActionGroup otherActionGroup = new DefaultActionGroup();

    List<AnAction> otherActions = myBuildDescriptor.getActions();
    if (!otherActions.isEmpty()) {
      otherActionGroup.addSeparator();
      for (AnAction anAction : otherActions) {
        otherActionGroup.add(anAction);
      }
      otherActionGroup.addSeparator();
    }
    return new AnAction[]{actionGroup, otherActionGroup};
  }
@Override
  public AnAction @NotNull [] createConsoleActions()