// ĠCopyright Ġ 2 0 0 0 - 2 0 1 7 Ġ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 . debugger . streams . exec Ċ Ċ import Ġcom . intellij . debugger . impl . Output Checker Ċ import Ġcom . intellij . debugger . streams . test . Trace Execution TestCase Ċ import Ġcom . intellij . execution . configurations . Java Parameters Ċ import Ġcom . intellij . openapi . application . Application Manager Ċ import Ġcom . intellij . openapi . application . Plugin Path Manager Ċ import Ġcom . intellij . openapi . vfs . new vfs . impl . V fs Root Access Ċ import Ġcom . intellij . test Framework . Psi TestUtil Ċ import Ġjava . io . File Ċ Ċ /** Ċ Ġ* Ġ@ author ĠV ital iy . Bib ae v Ċ Ġ*/ Ċ abstract Ġclass ĠLibrary Trace Execution TestCase ( private Ġval Ġjar Name : ĠString ) Ġ: ĠTrace Execution TestCase () Ġ{ ĊĠ Ġprivate Ġval Ġlibrary Directory Ġ= ĠFile ( Plugin Path Manager . get Plugin Home Path (" stream - debugger ") Ġ+ Ġ"/ lib "). absolute Path ĊĠ Ġoverride Ġfun ĠsetUp Module () Ġ{ ĊĠĠĠ Ġsuper . setUp Module () ĊĠĠĠ ĠApplication Manager . getApplication (). run Write Action Ġ{ ĊĠĠĠĠĠ ĠV fs Root Access . allow Root Access ( library Directory ) ĊĠĠĠĠĠ ĠPsi TestUtil . add Library ( my Module , Ġ"$ library Directory /$ jar Name ") ĊĠĠĠ Ġ} ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġinit Output Checker (): ĠOutput Checker Ġ{ ĊĠĠĠ Ġreturn Ġobject Ġ: ĠOutput Checker ( test App Path , Ġapp Output Path ) Ġ{ ĊĠĠĠĠĠ Ġoverride Ġfun Ġreplace Additional In Output ( str : ĠString ): ĠString Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġstr . replace First ("$ library Directory /$ jar Name ", Ġ"! LIBRARY _ JAR !") ĊĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġcreate Java Parameters ( main Class : ĠString ?): ĠJava Parameters Ġ{ ĊĠĠĠ Ġval Ġparameters Ġ= Ġsuper . create Java Parameters ( main Class ) ĊĠĠĠ Ġparameters . class Path . add ("$ library Directory /$ jar Name ") ĊĠĠĠ Ġreturn Ġparameters ĊĠ Ġ} ĊĊĠ Ġfinal Ġoverride Ġfun Ġget Test App Path (): ĠString Ġ{ ĊĠĠĠ Ġreturn ĠFile ( Plugin Path Manager . get Plugin Home Path (" stream - debugger ") Ġ+ Ġ"/ testData /${ getTest App RelativePath ()} "). absolute Path ĊĠ Ġ} ĊĊĠ Ġabstract Ġfun Ġget Test App RelativePath (): ĠString Ċ }