// Ġ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 . space . plugins . pipelines . services . run Ċ Ċ import Ġcom . intellij . execution . Program Runner Util Ċ import Ġcom . intellij . execution . Run Manager Ċ import Ġcom . intellij . execution . exec utors . Default Run Executor Ċ import Ġcom . intellij . openapi . project . Project Ċ Ċ object ĠSpace Run Configuration Utils Ġ{ ĊĠ Ġfun Ġrun ( task Name : ĠString , Ġproject : ĠProject ) Ġ{ ĊĠĠĠ Ġval Ġrun Manager Ġ= ĠRun Manager . getInstance ( project ) ĊĠĠĠ Ġval Ġsettings Ġ= Ġrun Manager . create Configuration (" Run Ġtask Ġ$ task Name ", ĠSpace Run Configuration Type :: class . java ) ĊĠĠĠ Ġval Ġconfiguration Ġ= Ġsettings . configuration Ġas ĠSpace Run Configuration ĊĠĠĠ Ġconfiguration . options . task Name Ġ= Ġtask Name ĊĠĠĠ Ġrun Manager . add Configuration ( settings ) ĊĠĠĠ Ġrun Manager . selected Configuration Ġ= Ġsettings ĊĠĠĠ ĠProgram Runner Util . execute Configuration ( settings , ĠDefault Run Executor . get Run Executor Instance ()) ĊĠ Ġ} Ċ } Ċ