// Ġ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 . ui Ċ Ċ import Ġcom . intellij . ide . ui . UI Settings Ċ import Ġcom . intellij . openapi . options . Unnamed Configurable Ċ import Ġcom . intellij . openapi . vcs . Check in Project Panel Ċ import Ġcom . intellij . openapi . vcs . check in . Check in Handler Util . disable When D umb Ċ import Ġcom . intellij . openapi . vcs . configurable . Commit Options Configurable Ċ import Ġcom . intellij . openapi . vcs . ui . Refresh able On Component Ċ import Ġcom . intellij . ui . components . JB CheckBox Ċ import Ġcom . intellij . vcs . commit . is Non Modal Commit Ċ import Ġjava . util . function . Consumer Ċ import Ġjavax . swing . J Component Ċ import Ġkotlin . reflect . K Mutable Property 0 Ċ Ċ open Ġclass ĠBoolean Commit Option ( ĊĠ Ġprivate Ġval Ġcheck in Panel : ĠCheck in Project Panel , ĊĠ Ġtext : ĠString , ĊĠ Ġdisable When D umb : ĠBoolean , ĊĠ Ġprivate Ġval Ġgetter : Ġ() Ġ-> ĠBoolean , ĊĠ Ġprivate Ġval Ġsetter : ĠConsumer < Boolean > Ċ ) Ġ: ĠRefresh able On Component , ĊĠĠĠ ĠUn named Configurable Ġ{ ĊĊĠ Ġconstructor ( panel : ĠCheck in Project Panel , Ġtext : ĠString , Ġdisable When D umb : ĠBoolean , Ġproperty : ĠK Mutable Property 0 < Boolean >) Ġ: ĊĠĠĠ Ġthis ( panel , Ġtext , Ġdisable When D umb , Ġ{ Ġproperty . get () Ġ}, ĠConsumer Ġ{ Ġproperty . set ( it ) Ġ}) ĊĊĠ Ġprotected Ġval ĠcheckBox Ġ= ĠJ B CheckBox ( text ). apply Ġ{ ĊĠĠĠ Ġis Focus able Ġ= ĠisIn Settings Ġ|| ĠisIn Non Modal Options Popup Ġ|| ĠUI Settings . shadow Instance . disable Mn emon ics In Controls ĊĠĠĠ Ġif Ġ( disable When D umb Ġ&& Ġ! isIn Settings ) Ġdisable When D umb ( check in Panel . project , Ġthis , Ġ" Imp ossible Ġuntil Ġindices Ġare Ġup - to - date ") ĊĠ Ġ} ĊĊĠ Ġprivate Ġval ĠisIn Settings Ġget () Ġ= Ġcheck in Panel Ġis ĠCommit Options Configurable . Check in Panel ĊĠ Ġprivate Ġval ĠisIn Non Modal Options Popup Ġget () Ġ= Ġcheck in Panel . is Non Modal Commit ĊĊĠ Ġoverride Ġfun Ġrefresh () Ġ{ ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġsave State () Ġ{ ĊĠĠĠ Ġsetter . accept ( checkBox . isSelected ) ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġrestore State () Ġ{ ĊĠĠĠ ĠcheckBox . isSelected Ġ= Ġgetter () ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġget Component (): ĠJ Component Ġ= ĠcheckBox ĊĊĠ Ġoverride Ġfun Ġcreate Component () Ġ= Ġcomponent ĊĊĠ Ġoverride Ġfun Ġis Modified () Ġ= ĠcheckBox . isSelected Ġ!= Ġgetter () ĊĊĠ Ġoverride Ġfun Ġapply () Ġ= Ġsave State () ĊĊĠ Ġoverride Ġfun Ġreset () Ġ= Ġrestore State () Ċ }