// Ġ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 Ġgit 4 idea . index Ċ Ċ import Ġcom . intellij . openapi . application . Application Manager Ċ import Ġcom . intellij . openapi . application . invoke Later Ċ import Ġcom . intellij . openapi . project . Project Ċ import Ġcom . intellij . openapi . startup . Startup Activity Ċ import Ġcom . intellij . openapi . util . registry . Registry Ċ import Ġcom . intellij . openapi . vcs . impl . Line Status Tracker Setting Listener Ċ import Ġcom . intellij . vcs . commit . Commit Mode Ċ import Ġcom . intellij . vcs . commit . Commit Mode Manager Ċ import Ġgit 4 idea . Git V cs Ċ import Ġgit 4 idea . config . Git V cs Application Settings Ċ Ċ internal Ġclass ĠCommit Mode Listener ( val Ġproject : ĠProject ) Ġ: ĠCommit Mode Manager . Commit Mode Listener Ġ{ ĊĠ Ġoverride Ġfun Ġcommit Mode Changed () Ġ{ ĊĠĠĠ ĠApplication Manager . getApplication (). assertIs Dispatch Thread () ĊĊĠĠĠ Ġif Ġ( is Staging Area Available ( project )) Ġ{ ĊĠĠĠĠĠ ĠGit Stage Tracker . getInstance ( project ). update Tracker State () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġinvoke Later Ġ{ ĊĠĠĠĠĠ Ġ// ĠNotify ĠLSTM Ġafter ĠCL M Ġto Ġlet Ġit Ġsave Ġcurrent Ġpartial Ġchange lists Ġstate ĊĠĠĠĠĠ ĠApplication Manager . getApplication (). message Bus . sync Publisher ( Line Status Tracker Setting Listener . TOPIC ). settings Updated () ĊĠĠĠ Ġ} ĊĠ Ġ} Ċ } Ċ Ċ internal Ġclass ĠGit Stage Startup Activity Ġ: ĠStartup Activity . Background Ġ{ ĊĠ Ġoverride Ġfun Ġrun Activity ( project : ĠProject ) Ġ{ ĊĠĠĠ Ġif Ġ( is Staging Area Available ( project )) Ġ{ ĊĠĠĠĠĠ ĠGit Stage Tracker . getInstance ( project ) Ġ// Ġinitialize Ġtracker ĊĠĠĠ Ġ} ĊĠ Ġ} Ċ } Ċ Ċ fun Ġstage Line Status Tracker Registry Option () Ġ= ĠRegistry . get (" git . enable . stage . line . status . tracker ") Ċ Ċ fun Ġenable Staging Area ( enabled : ĠBoolean ) Ġ{ ĊĠ Ġval Ġapplication Settings Ġ= ĠGit V cs Application Settings . getInstance () ĊĠ Ġif Ġ( enabled Ġ== Ġapplication Settings . is Staging Area Enabled ) Ġreturn ĊĊĠ Ġapplication Settings . is Staging Area Enabled Ġ= Ġenabled ĊĠ ĠApplication Manager . getApplication (). message Bus . sync Publisher ( Commit Mode Manager . SETTINGS ). settings Changed () Ċ } Ċ Ċ fun Ġcan Enable Staging Area () Ġ= ĠCommit Mode Manager . is Non Modal In Settings () Ċ Ċ fun Ġis Staging Area Available ( project : ĠProject ): ĠBoolean Ġ{ ĊĠ Ġval Ġcommit Mode Ġ= ĠCommit Mode Manager . getInstance ( project ). getCurrent Commit Mode () ĊĠ Ġreturn Ġcommit Mode Ġis ĠCommit Mode . External Commit Mode Ġ&& ĊĠĠĠĠĠĠĠĠ Ġcommit Mode . vcs . key Instance Method Ġ== ĠGit V cs . getKey () Ċ }