// ĠCopyright Ġ 2 0 0 0 - 2 0 2 0 ĠJetBrains Ġs . r . o . ĠUse Ġof Ġthis Ġsource Ġcode Ġis Ġgoverned Ġby Ġthe ĠApache Ġ 2 . 0 Ġlicense Ġthat Ġcan Ġbe Ġfound Ġin Ġthe ĠLICENSE Ġfile . Ċ package Ġcom . intellij . execution . runners Ċ Ċ import Ġcom . intellij . execution . ExecutionException Ċ import Ġcom . intellij . execution . Execution Manager Ċ import Ġcom . intellij . execution . configurations . Run Profile State Ċ import Ġcom . intellij . execution . configurations . Runner Settings Ċ import Ġcom . intellij . execution . ui . Run Content Descriptor Ċ import Ġcom . intellij . openapi . project . Project Ċ import Ġorg . jetbrains . concurrency . Promise Ċ import Ġorg . jetbrains . concurrency . resolved Promise Ċ Ċ abstract Ġclass ĠGeneric Program Runner < Settings Ġ: ĠRunner Settings > Ġ: ĠProgram Runner < Settings > Ġ{ ĊĠ Ġfinal Ġoverride Ġfun Ġexecute ( environment : ĠExecution Environment ) Ġ{ ĊĠĠĠ Ġexecute ( environment , Ġenvironment . callback , Ġenvironment . state Ġ?: Ġreturn ) ĊĠ Ġ} ĊĊĠ Ġprotected Ġopen Ġfun Ġexecute ( environment : ĠExecution Environment , Ġstate : ĠRun Profile State ) Ġ{ ĊĠĠĠ ĠExecution Manager . getInstance ( environment . project ). start Run Profile ( environment ) Ġ{ ĊĠĠĠĠĠ Ġresolved Promise ( do Execute ( state , Ġenvironment )) ĊĠĠĠ Ġ} ĊĠ Ġ} ĊĊĠ Ġprotected Ġopen Ġfun Ġexecute ( environment : ĠExecution Environment , Ġcallback : ĠProgram Runner . Callback ?, Ġstate : ĠRun Profile State ) Ġ{ ĊĠĠĠ Ġexecute ( environment , Ġstate ) ĊĠ Ġ} ĊĊĠ Ġ@ Throws ( ExecutionException :: class ) ĊĠ Ġprotected Ġopen Ġfun Ġdo Execute ( state : ĠRun Profile State , Ġenvironment : ĠExecution Environment ): ĠRun Content Descriptor ? Ġ{ ĊĠĠĠ Ġ@ Suppress (" DE PREC ATION ") ĊĠĠĠ Ġreturn Ġdo Execute ( environment . project , Ġstate , Ġenvironment . content To Re use , Ġenvironment ) ĊĠ Ġ} ĊĊĠ Ġ@ Deprecated ("") ĊĠ Ġprotected Ġopen Ġfun Ġdo Execute ( project : ĠProject , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġstate : ĠRun Profile State , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġcontent To Re use : ĠRun Content Descriptor ?, ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġenvironment : ĠExecution Environment ): ĠRun Content Descriptor ? Ġ{ ĊĠĠĠ Ġthrow ĠAbstract Method Error () ĊĠ Ġ} Ċ } Ċ Ċ abstract Ġclass ĠAsync Program Runner < Settings Ġ: ĠRunner Settings > Ġ: ĠProgram Runner < Settings > Ġ{ ĊĠ Ġ@ Throws ( ExecutionException :: class ) ĊĠ Ġfinal Ġoverride Ġfun Ġexecute ( environment : ĠExecution Environment ) Ġ{ ĊĠĠĠ Ġval Ġstate Ġ= Ġenvironment . state Ġ?: Ġreturn ĊĠĠĠ ĠExecution Manager . getInstance ( environment . project ). start Run Profile ( environment ) Ġ{ ĊĠĠĠĠĠ Ġexecute ( environment , Ġstate ) ĊĠĠĠ Ġ} ĊĠ Ġ} ĊĊĠ Ġ@ Throws ( ExecutionException :: class ) ĊĠ Ġprotected Ġabstract Ġfun Ġexecute ( environment : ĠExecution Environment , Ġstate : ĠRun Profile State ): ĠPromise < Run Content Descriptor ?> Ċ }