// Ġ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 . actions Ċ Ċ import Ġcom . intellij . openapi . action System . An ActionEvent Ċ import Ġcom . intellij . openapi . project . D umb Aware Action Ċ import Ġcom . intellij . openapi . project . Project Ċ import Ġcom . intellij . util . containers . as JB Iterable Ċ import Ġgit 4 idea . index . ui . Git File Status Node Ċ import Ġgit 4 idea . index . ui . Git Stage Data Keys Ċ import Ġjava . util . function . Supplier Ċ import Ġjavax . swing . Icon Ċ Ċ abstract Ġclass ĠGit File Status Node Action ( text : ĠSupplier < String >, Ġdescription : ĠSupplier < String >, Ġicon : ĠIcon ? Ġ= Ġnull ) ĊĠ Ġ: ĠD umb Aware Action ( text , Ġdescription , Ġicon ) Ġ{ ĊĊĠ Ġoverride Ġfun Ġupdate ( e : ĠAn ActionEvent ) Ġ{ ĊĠĠĠ Ġval Ġnodes Ġ= Ġe . getData ( Git Stage Data Keys . GIT _ FILE _ STATUS _ NODES ). as JB Iterable () ĊĠĠĠ Ġe . presentation . isEnabled And Visible Ġ= Ġe . project Ġ!= Ġnull Ġ&& Ġnodes . filter ( this :: matches ). isNotEmpty ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun ĠactionPerformed ( e : ĠAn ActionEvent ) Ġ{ ĊĠĠĠ Ġval Ġproject Ġ= Ġe . project !! ĊĠĠĠ Ġval Ġnodes Ġ= Ġe . get Required Data ( Git Stage Data Keys . GIT _ FILE _ STATUS _ NODES ). as JB Iterable () ĊĊĠĠĠ Ġperform ( project , Ġnodes . filter ( this :: matches ). toList ()) ĊĠ Ġ} ĊĊĠ Ġabstract Ġfun Ġmatches ( status Node : ĠGit File Status Node ): ĠBoolean ĊĠ Ġabstract Ġfun Ġperform ( project : ĠProject , Ġnodes : ĠList < Git File Status Node >) Ċ }