@NotNull public Runner addRunner(@NotNull ApplicationProcessDescriptor processDescriptor){
  RunOptions runOptions=dtoFactory.createDto(RunOptions.class);
  Runner runner=modelsFactory.createRunner(runOptions);
  String environmentId=processDescriptor.getEnvironmentId();
  if (environmentId != null && environmentId.startsWith(PROJECT_PREFIX)) {
    runner.setScope(PROJECT);
  }
  runnersId.add(processDescriptor.getProcessId());
  runner.setProcessDescriptor(processDescriptor);
  runner.setRAM(processDescriptor.getMemorySize());
  runner.setStatus(Runner.Status.DONE);
  runner.resetCreationTime();
  history.addRunner(runner);
  onSelectionChanged(RUNNER);
  runnerTimer.schedule(ONE_SEC.getValue());
  LaunchAction launchAction=actionFactory.createLaunch();
  runnerActions.put(runner,launchAction);
  launchAction.perform(runner);
  selectHistoryTab();
  return runner;
}

@ NotNull public Runner addRunner ( @ NotNull ApplicationProcessDescriptor processDescriptor ) { RunOptions runOptions = dtoFactory . createDto ( RunOptions . class ) ; Runner runner = modelsFactory . createRunner ( runOptions ) ; String environmentId = processDescriptor . getEnvironmentId ( ) ; if ( environmentId != null && environmentId . startsWith ( PROJECT_PREFIX ) ) { runner . setScope ( PROJECT ) ; } runnersId . add ( processDescriptor . getProcessId ( ) ) ; runner . setProcessDescriptor ( processDescriptor ) ; runner . setRAM ( processDescriptor . getMemorySize ( ) ) ; runner . setStatus ( Runner . Status . DONE ) ; runner . resetCreationTime ( ) ; history . addRunner ( runner ) ; onSelectionChanged ( RUNNER ) ; runnerTimer . schedule ( ONE_SEC . getValue ( ) ) ; LaunchAction launchAction = actionFactory . createLaunch ( ) ; runnerActions . put ( runner , launchAction ) ; launchAction . perform ( runner ) ; selectHistoryTab ( ) ; return runner ; }
adds already running runner .
