@AssistedInject public RunnerImpl(@NotNull RunnerLocalizationConstant locale,@NotNull RunnerCounter runnerCounter,@NotNull GetEnvironmentsUtil util,@NotNull @Assisted RunOptions runOptions,@NotNull @Assisted Scope environmentScope,@Nullable @Assisted String environmentName){
  this.runOptions=runOptions;
  this.ram=runOptions.getMemorySize();
  this.title=RUNNER_NAME + runnerCounter.getRunnerNumber() + (environmentName == null ? "" : " - " + getCorrectName(environmentName));
  this.activeTab=locale.runnerTabConsole();
  this.status=IN_QUEUE;
  this.scope=environmentScope;
  creationTime=System.currentTimeMillis();
  String environmentId=runOptions.getEnvironmentId();
  if (environmentId == null || environmentId.startsWith("project:/")) {
    this.type=util.getType();
  }
 else {
    this.type=util.getCorrectCategoryName(runOptions.getEnvironmentId());
  }
  if (environmentId != null) {
    runOptions.setEnvironmentId(environmentId);
  }
}

@ AssistedInject public RunnerImpl ( @ NotNull RunnerLocalizationConstant locale , @ NotNull RunnerCounter runnerCounter , @ NotNull GetEnvironmentsUtil util , @ NotNull @ Assisted RunOptions runOptions , @ NotNull @ Assisted Scope environmentScope , @ Nullable @ Assisted String environmentName ) { this . runOptions = runOptions ; this . ram = runOptions . getMemorySize ( ) ; this . title = RUNNER_NAME + runnerCounter . getRunnerNumber ( ) + ( environmentName == null ? "" : " - " + getCorrectName ( environmentName ) ) ; this . activeTab = locale . runnerTabConsole ( ) ; this . status = IN_QUEUE ; this . scope = environmentScope ; creationTime = System . currentTimeMillis ( ) ; String environmentId = runOptions . getEnvironmentId ( ) ; if ( environmentId == null || environmentId . startsWith ( "project:/" ) ) { this . type = util . getType ( ) ; } else { this . type = util . getCorrectCategoryName ( runOptions . getEnvironmentId ( ) ) ; } if ( environmentId != null ) { runOptions . setEnvironmentId ( environmentId ) ; } }
this runner needs runner options ( user configurations ) and environment name ( inputted by user ) . it analyzes all given information and get necessary information .
