@NotNull
  private Runner launchRunner(@NotNull Runner runner) {
    if (runActionPermit.isAllowed()) {

      CurrentProject currentProject = appContext.getCurrentProject();

      if (currentProject == null) {
        throw new IllegalStateException(
            "Can't launch runner for current project. Current project is absent...");
      }

      selectedEnvironment = null;

      panelState.setState(RUNNERS);
      view.showOtherButtons();

      history.addRunner(runner);

      runnerInQueueTimer.schedule(ONE_SEC.getValue());

      CheckRamAndRunAction checkRamAndRunAction = actionFactory.createCheckRamAndRun();
      checkRamAndRunAction.perform(runner);

      runnerActions.put(runner, checkRamAndRunAction);

      runner.resetCreationTime();
      runnerTimer.schedule(ONE_SEC.getValue());
    } else {
      runActionDenyAccessDialog.show();
    }
    return runner;
  }
  /** {@inheritDoc} */
  @Override
  public void onRerunButtonClicked() {
    if (runActionPermit.isAllowed()) {

      selectedRunner.setStatus(IN_QUEUE);

      RunnerAction runnerAction = runnerActions.get(selectedRunner);
      if (runnerAction == null || runnerAction instanceof LaunchAction) {
        // Create new CheckRamAndRunAction and update selected runner
        launchRunner(selectedRunner);
      } else {
        runnerAction.perform(selectedRunner);

        update(selectedRunner);
        selectedRunner.resetCreationTime();
      }
    } else {
      runActionDenyAccessDialog.show();
    }
  }