/* Ċ Ġ* ĠCopyright Ġ 2 0 0 0 - 2 0 1 8 ĠJetBrains Ġs . r . o . Ġand ĠKotlin ĠProgramming ĠLanguage Ġcontributors . Ċ Ġ* ĠUse Ġof Ġthis Ġsource Ġcode Ġis Ġgoverned Ġby Ġthe ĠApache Ġ 2 . 0 Ġlicense Ġthat Ġcan Ġbe Ġfound Ġin Ġthe Ġlicense / LICENSE . txt Ġfile . Ċ Ġ*/ Ċ Ċ package Ġorg . jetbrains . kotlin . idea . cache s . resolve . util Ċ Ċ import Ġcom . intellij . openapi . progress . Process Canceled Exception Ċ import Ġcom . intellij . openapi . project . Project Ċ import Ġorg . jetbrains . kotlin . context . Global Context Impl Ċ import Ġorg . jetbrains . kotlin . idea . project . library To Source Analysis Enabled Ċ import Ġorg . jetbrains . kotlin . idea . project . use Composite Analysis Ċ import Ġorg . jetbrains . kotlin . progress . Progress Indicator And Compilation Canceled Status Ċ import Ġorg . jetbrains . kotlin . storage . Exception Tracker Ċ import Ġorg . jetbrains . kotlin . storage . Lock Based Storage Manager Ċ Ċ private Ġfun ĠGlobal Context Impl . context With Composite Exception Tracker ( debug Name : ĠString ): ĠGlobal Context Impl Ġ{ ĊĠĠĠ Ġval Ġnew Exception Tracker Ġ= ĠComposite Exception Tracker ( this . exception Tracker ) ĊĠĠĠ Ġreturn ĠGlobal Context Impl ( ĊĠĠĠĠĠĠĠ Ġstorage Manager . replace Exception Handling ( debug Name , Ġnew Exception Tracker ), ĊĠĠĠĠĠĠĠ Ġnew Exception Tracker ĊĠĠĠ Ġ) Ċ } Ċ Ċ private Ġfun ĠGlobal Context Impl . context With New Lock And Composite Exception Tracker ( debug Name : ĠString ): ĠGlobal Context Impl Ġ{ ĊĠĠĠ Ġval Ġnew Exception Tracker Ġ= ĠComposite Exception Tracker ( this . exception Tracker ) ĊĠĠĠ Ġreturn ĠGlobal Context Impl ( ĊĠĠĠĠĠĠĠ ĠLock Based Storage Manager . create With Exception Handling ( debug Name , Ġnew Exception Tracker , Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠProgress Indicator And Compilation Canceled Status . check Canceled () ĊĠĠĠĠĠĠĠ Ġ}, Ġ{ Ġthrow ĠProcess Canceled Exception ( it ) Ġ}), ĊĠĠĠĠĠĠĠ Ġnew Exception Tracker ĊĠĠĠ Ġ) Ċ } Ċ Ċ internal Ġfun ĠGlobal Context Impl . context With Composite Exception Tracker ( project : ĠProject , Ġdebug Name : ĠString ): ĠGlobal Context Impl Ġ= ĊĠĠĠ Ġif Ġ( project . use Composite Analysis Ġ|| Ġproject . library To Source Analysis Enabled ) Ġ{ ĊĠĠĠĠĠĠĠ Ġthis . context With Composite Exception Tracker ( debug Name ) ĊĠĠĠ Ġ} Ġelse Ġ{ ĊĠĠĠĠĠĠĠ Ġthis . context With New Lock And Composite Exception Tracker ( debug Name ) ĊĠĠĠ Ġ} Ċ Ċ private Ġclass ĠComposite Exception Tracker ( val Ġdelegate : ĠException Tracker ) Ġ: ĠException Tracker () Ġ{ ĊĠĠĠ Ġoverride Ġfun Ġget Modification Count (): ĠLong Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġsuper . get Modification Count () Ġ+ Ġdelegate . modification Count ĊĠĠĠ Ġ} Ċ } Ċ