// ĠCopyright Ġ 2 0 0 0 - 2 0 1 9 Ġ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 . openapi . vcs . changes . actions Ċ Ċ import Ġcom . intellij . openapi . action System . Action Places Ċ import Ġcom . intellij . openapi . action System . Presentation Ċ import Ġcom . intellij . openapi . project . Project Ċ import Ġcom . intellij . openapi . vcs . FilePath Ċ import Ġcom . intellij . openapi . vcs . File Status Ċ import Ġcom . intellij . openapi . vcs . Project Level V cs Manager Ċ import Ġcom . intellij . openapi . vcs . actions . Abstract Common Check in Action Ċ import Ġcom . intellij . openapi . vcs . actions . V cs Context Ċ import Ġcom . intellij . openapi . vcs . changes . Change Ċ import Ġcom . intellij . openapi . vcs . changes . Change List Manager Ċ import Ġcom . intellij . vcs Util . V cs Util . get FilePath Ċ Ċ abstract Ġclass ĠAbstract Commit Changes Action Ġ: ĠAbstract Common Check in Action () Ġ{ ĊĠ Ġoverride Ġfun Ġget Roots ( data Context : ĠV cs Context ): ĠArray < FilePath > Ġ= ĊĠĠĠ ĠProject Level V cs Manager . getInstance ( data Context . project !! ). all Version ed Roots . map Ġ{ Ġget FilePath ( it ) Ġ}. to Typed Array () ĊĊĠ Ġoverride Ġfun Ġapproximately Has Roots ( data Context : ĠV cs Context ): ĠBoolean Ġ= ĠProject Level V cs Manager . getInstance ( ĊĠĠĠ Ġdata Context . project !! ). has Any Mappings () ĊĊĠ Ġoverride Ġfun Ġupdate ( vcs Context : ĠV cs Context , Ġpresentation : ĠPresentation ) Ġ{ ĊĠĠĠ Ġsuper . update ( vcs Context , Ġpresentation ) ĊĊĠĠĠ Ġif Ġ( presentation . isEnabled And Visible ) Ġ{ ĊĠĠĠĠĠ Ġval Ġchanges Ġ= Ġv cs Context . selected Changes ĊĊĠĠĠĠĠ Ġif Ġ( vcs Context . place Ġ== ĠAction Places . CHANG ES _ VIEW _ POP UP ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġchange Lists Ġ= Ġv cs Context . selected Change Lists ĊĊĠĠĠĠĠĠĠ Ġpresentation . isEnabled Ġ= ĊĠĠĠĠĠĠĠĠĠ Ġif Ġ( change Lists . isNull OrEmpty ()) Ġ! changes . isNull OrEmpty () Ġelse Ġchange Lists . size Ġ== Ġ 1 Ġ&& Ġ! change Lists [ 0 ]. changes . isEmpty () ĊĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠ Ġif Ġ( presentation . isEnabled Ġ&& Ġ! changes . isNull OrEmpty ()) Ġ{ ĊĠĠĠĠĠĠĠ Ġdisable If Any H ij ack ed Changes ( vcs Context . project !! , Ġpresentation , Ġchanges ) ĊĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĠ Ġ} ĊĊĠ Ġprivate Ġfun Ġdisable If Any H ij ack ed Changes ( project : ĠProject , Ġpresentation : ĠPresentation , Ġchanges : ĠArray < Change >) Ġ{ ĊĠĠĠ Ġval Ġmanager Ġ= ĠChange List Manager . getInstance ( project ) ĊĠĠĠ Ġval Ġhas H ij ack ed Changes Ġ= Ġchanges . any Ġ{ Ġit . file Status Ġ== ĠFile Status . HI J ACK ED Ġ&& Ġmanager . get Change List ( it ) Ġ== Ġnull Ġ} ĊĊĠĠĠ Ġpresentation . isEnabled Ġ= Ġ! has H ij ack ed Changes ĊĠ Ġ} Ċ }