// Ġ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 . completion . n gram Ċ Ċ import Ġcom . intellij . completion . n gram . s lp . modeling . runners . Model Runner Ċ import Ġcom . intellij . lang . Language Ċ import Ġcom . intellij . openapi . components . Service Manager Ċ import Ġcom . intellij . openapi . project . Project Ċ import Ġcom . intellij . psi . Psi File Ċ Ċ class ĠNG ram Model Runner Manager Ġ{ ĊĊĠ Ġprivate Ġval Ġmy Model Run ners : ĠMutable Map < Language , ĠModel Runner With Cache > Ġ= Ġmutable Map Of () ĊĊĠ Ġfun Ġprocess File ( file : ĠPsi File , Ġlanguage : ĠLanguage ) Ġ{ ĊĠĠĠ Ġmy Model Run ners . get Or Put ( language , Ġ{ ĠModel Runner With Cache () Ġ}). process File ( file ) ĊĠ Ġ} ĊĊĠ Ġfun ĠgetModel Runner For Language ( language : ĠLanguage ): ĠModel Runner ? Ġ{ ĊĠĠĠ Ġreturn Ġmy Model Run ners [ language ] ĊĠ Ġ} ĊĊĠ Ġcompanion Ġobject Ġ{ ĊĠĠĠ Ġfun ĠgetInstance ( project : ĠProject ): ĠNG ram Model Runner Manager Ġ{ ĊĠĠĠĠĠ Ġreturn ĠService Manager . getService ( project , ĠNG ram Model Runner Manager :: class . java ) ĊĠĠĠ Ġ} ĊĠ Ġ} Ċ }