// Ġ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 . jetbrains . change Reminder Ċ Ċ import Ġcom . intellij . openapi . project . Project Ċ import Ġcom . intellij . openapi . vcs . Check in Project Panel Ċ import Ġcom . intellij . openapi . vcs . FilePath Ċ import Ġcom . intellij . openapi . vcs . Project Level V cs Manager Ċ import Ġcom . intellij . openapi . vcs . changes . Change List Manager Ċ import Ġcom . intellij . openapi . vcs . changes . Changes Util Ċ import Ġcom . intellij . openapi . vcs . changes . ui . Commit Change List Dialog Ċ import Ġcom . intellij . openapi . vfs . Virtual File Ċ import Ġcom . intellij . util . Consumer Ċ import Ġcom . jetbrains . change Reminder . predict . Predict ed Change Ċ import Ġcom . jetbrains . change Reminder . predict . Predict ed FilePath Ċ import Ġgit 4 idea . Git Commit Ċ import Ġgit 4 idea . Git V cs Ċ import Ġgit 4 idea . check in . Git Check in Environment Ċ import Ġgit 4 idea . history . Git Commit Requirements Ċ import Ġgit 4 idea . history . Git Commit Requirements . Diff In Merge Commits Ċ import Ġgit 4 idea . history . Git Commit Requirements . Diff Rename Limit Ċ import Ġgit 4 idea . history . Git Log Util Ċ Ċ private Ġfun ĠCheck in Project Panel . git Check in Options (): ĠGit Check in Environment . Git Check in Options ? Ġ{ ĊĠ Ġif Ġ( this Ġ! is ĠCommit Change List Dialog ) Ġreturn Ġnull ĊĠ Ġreturn Ġadditional Components ĊĠĠĠĠĠĠĠĠĠĠ Ġ. filter Is Instance ( Git Check in Environment . Git Check in Options :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠ Ġ. first OrNull () ĊĠĠĠĠĠĠĠĠ Ġ?: Ġreturn Ġnull Ċ } Ċ Ċ fun ĠCheck in Project Panel . is Am end (): ĠBoolean Ġ= Ġthis . git Check in Options ()?. is Am end Ġ?: Ġfalse Ċ Ċ fun ĠCheck in Project Panel . author (): ĠString ? Ġ= Ġthis . git Check in Options ()?. author Ċ Ċ fun ĠCheck in Project Panel . get Git Root Files ( project : ĠProject ): ĠMap < Virtual File , ĠCollection < FilePath >> Ġ{ ĊĠ Ġval Ġroot Files Ġ= ĠHashMap < Virtual File , ĠHashSet < FilePath >>() ĊĊĠ Ġthis . selected Changes . forEach Ġ{ Ġfile Ġ-> ĊĠĠĠ Ġval ĠfilePath Ġ= ĠChanges Util . get FilePath ( file ) ĊĠĠĠ Ġval Ġfile V cs Ġ= ĠProject Level V cs Manager . getInstance ( project ). get V cs Root Object For ( filePath ) ĊĠĠĠ Ġif Ġ( file V cs Ġ!= Ġnull Ġ&& Ġfile V cs . vcs Ġis ĠGit V cs ) Ġ{ ĊĠĠĠĠĠ Ġval Ġfile Root Ġ= Ġfile V cs . path ĊĠĠĠĠĠ Ġif Ġ( file Root Ġ!= Ġnull ) Ġ{ ĊĠĠĠĠĠĠĠ Ġroot Files . get Or Put ( file Root ) Ġ{ ĠHashSet () Ġ}. add ( filePath ) ĊĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĠ Ġ} ĊĊĠ Ġreturn Ġroot Files Ċ } Ċ Ċ fun Ġprocess Commits From Hashes ( project : ĠProject , Ġroot : ĠVirtual File , Ġhashes : ĠList < String >, Ġcommit Consumer : Ġ( Git Commit ) Ġ-> ĠUnit ) Ġ{ ĊĠ Ġval Ġrequirements Ġ= ĠGit Commit Requirements ( diff Rename Limit Ġ= ĠDiff Rename Limit . NO _ RE NAMES , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġdiff In Merge Commits Ġ= ĠDiff In Merge Commits . NO _ DIFF ) ĊĠ ĠGit Log Util . read Full Details For Hashes ( project , Ġroot , Ġhashes . toList (), Ġrequirements , ĠConsumer < Git Commit > Ġ{ ĊĠĠĠ Ġcommit Consumer ( it ) ĊĠ Ġ}) Ċ } Ċ Ċ fun ĠGit Commit . changed FilePath s (): ĠList < FilePath > Ġ= Ġthis . changes . map NotNull Ġ{ ĠChanges Util . get FilePath ( it ) Ġ} Ċ Ċ internal Ġfun ĠCollection < FilePath >. to Predict ed Files ( change List Manager : ĠChange List Manager ) Ġ= Ġthis . map NotNull Ġ{ ĊĠ Ġval Ġcurrent Change Ġ= Ġchange List Manager . get Change ( it ) ĊĠ Ġwhen Ġ{ ĊĠĠĠ Ġcurrent Change Ġ!= Ġnull Ġ-> ĠPredict ed Change ( current Change ) ĊĠĠĠ Ġit . virtual File Ġ!= Ġnull Ġ-> ĠPredict ed FilePath ( it ) ĊĠĠĠ Ġelse Ġ-> Ġnull ĊĠ Ġ} Ċ } Ċ Ċ fun Ġ< T > Ġmeasure Supplier Time Millis ( supplier : Ġ() Ġ-> ĠT ): ĠPair < Long , ĠT > Ġ{ ĊĠ Ġval ĠstartTime Ġ= ĠSystem . currentTimeMillis () ĊĠ Ġval Ġresult Ġ= Ġsupplier () ĊĠ Ġval Ġexecution Time Ġ= ĠSystem . currentTimeMillis () Ġ- ĠstartTime ĊĊĠ Ġreturn ĠPair ( execution Time , Ġresult ) Ċ }