// Ġ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 . wm . impl Ċ Ċ import Ġcom . intellij . ide . Ui Activity Ċ import Ġcom . intellij . ide . Ui Activity Monitor Ċ import Ġcom . intellij . ide . impl . Content Manager Watcher Ċ import Ġcom . intellij . notification . Event Log Ċ import Ġcom . intellij . openapi . Disposable Ċ import Ġcom . intellij . openapi . action System . Action Group Ċ import Ġcom . intellij . openapi . action System . Action Manager Ċ import Ġcom . intellij . openapi . action System . An Action Ċ import Ġcom . intellij . openapi . action System . impl . Action ManagerImpl Ċ import Ġcom . intellij . openapi . application . Application Manager Ċ import Ġcom . intellij . openapi . application . Modal ity State Ċ import Ġcom . intellij . openapi . diagnostic . Logger Ċ import Ġcom . intellij . openapi . util . Action Callback Ċ import Ġcom . intellij . openapi . util . Busy Object Ċ import Ġcom . intellij . openapi . util . Dis poser Ċ import Ġcom . intellij . openapi . wm .* Ċ import Ġcom . intellij . openapi . wm . ex . Tool Window Ex Ċ import Ġcom . intellij . openapi . wm . ex . WindowManager Ex Ċ import Ġcom . intellij . openapi . wm . impl . commands . Final izable Command Ċ import Ġcom . intellij . openapi . wm . impl . content . Tool Window Content Ui Ċ import Ġcom . intellij . ui . Layer ed Icon Ċ import Ġcom . intellij . ui . content . Content Manager Ċ import Ġcom . intellij . ui . content . impl . Content Impl Ċ import Ġcom . intellij . ui . content . impl . Content ManagerImpl Ċ import Ġcom . intellij . ui . scale . J BU IS cale Ċ import Ġcom . intellij . util . Object Utils Ċ import Ġcom . intellij . util . ui . update . Activ atable Ċ import Ġcom . intellij . util . ui . update . Ui Notify Connector Ċ import Ġjava . awt . Rectangle Ċ import Ġjava . awt . event . Input Event Ċ import Ġjava . util .* Ċ import Ġjavax . swing . Icon Ċ import Ġjavax . swing . J Component Ċ import Ġjavax . swing . Layout Focus Traversal Policy Ċ import Ġkotlin . math . abs Ċ Ċ private Ġval ĠLOG Ġ= ĠLogger . getInstance ( Tool Window Impl :: class . java ) Ċ Ċ class ĠTool Window Impl Ġinternal Ġconstructor ( val Ġtool WindowManager : ĠTool WindowManager Impl , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġid : ĠString , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġcan Close Content : ĠBoolean , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġcomponent : ĠJ Component ?, ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġprivate Ġval Ġparent Disposable : ĠDis posable ) Ġ: ĠTool Window Ex Ġ{ ĊĠ Ġprivate Ġval Ġcomponent : ĠJ Component ĊĠ Ġprivate Ġvar Ġis Available Ġ= Ġtrue ĊĠ Ġprivate Ġval Ġcontent Manager : ĠContent Manager ĊĠ Ġprivate Ġvar Ġicon : ĠIcon ? Ġ= Ġnull ĊĠ Ġprivate Ġvar Ġstripe Title : ĠString ? Ġ= Ġnull ĊĠ Ġprivate Ġval Ġcontent Ui Ġ= ĠTool Window Content Ui ( this ) ĊĠ Ġprivate Ġvar Ġdecorator : ĠInternal Decorator ? Ġ= Ġnull ĊĠ Ġprivate Ġvar Ġhide On Empty Content Ġ= Ġfalse ĊĠ Ġvar Ġis Placeholder Mode Ġ= Ġfalse ĊĠ Ġprivate Ġvar Ġcontent Factory : ĠTool Window Factory ? Ġ= Ġnull ĊĠ Ġprivate Ġval Ġmy Showing Ġ= Ġobject Ġ: ĠBus y Object . Impl () Ġ{ ĊĠĠĠ Ġoverride Ġfun Ġis Ready () Ġ= Ġcomponent Ġ!= Ġnull Ġ&& Ġcomponent . is Showing ĊĠ Ġ} ĊĊĠ Ġprivate Ġvar Ġhelp Id : ĠString ? Ġ= Ġnull ĊĊĠ Ġinit Ġ{ ĊĠĠĠ Ġcontent Manager Ġ= ĠContent ManagerImpl ( content Ui , Ġcan Close Content , Ġtool WindowManager . project , Ġparent Disposable ) ĊĠĠĠ Ġif Ġ( component Ġ!= Ġnull ) Ġ{ ĊĠĠĠĠĠ Ġval Ġcontent Ġ= ĠContent Impl ( component , Ġ"", Ġfalse ) ĊĠĠĠĠĠ Ġcontent Manager . add Content ( content ) ĊĠĠĠĠĠ Ġcontent Manager . setSelected Content ( content , Ġfalse ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġthis . component Ġ= Ġcontent Manager . component ĊĠĠĠ ĠInternal Decorator . install Focus Traversal Policy ( this . component , ĠLayout Focus Traversal Policy ()) ĊĊĠĠĠ ĠDis poser . register ( parent Disposable , ĠUi Notify Connector ( this . component , Ġobject Ġ: ĠActiv atable Ġ{ ĊĠĠĠĠĠ Ġoverride Ġfun Ġshow Notify () Ġ{ ĊĠĠĠĠĠĠĠ Ġmy Showing . on Ready () ĊĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ})) ĊĠ Ġ} ĊĊĠ Ġfun ĠgetContent UI () Ġ= Ġcontent Ui ĊĊĠ Ġoverride Ġfun Ġget Disposable () Ġ= Ġparent Disposable ĊĊĠ Ġoverride Ġfun Ġremove () Ġ{ ĊĠĠĠ Ġtool WindowManager . do Unregister Tool Window ( id ) ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġactivate ( run nable : ĠRunnable ?) Ġ{ ĊĠĠĠ Ġactivate ( run nable , Ġtrue ) ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġactivate ( run nable : ĠRunnable ?, Ġauto Focus Contents : ĠBoolean ) Ġ{ ĊĠĠĠ Ġactivate ( run nable , Ġauto Focus Contents , Ġtrue ) ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġactivate ( run nable : ĠRunnable ?, Ġauto Focus Contents : ĠBoolean , Ġforced : ĠBoolean ) Ġ{ ĊĠĠĠ ĠApplication Manager . getApplication (). assertIs Dispatch Thread () ĊĠĠĠ Ġval Ġactivity Ġ= ĠUi Activity . Focus (" tool Window :$ id ") ĊĠĠĠ ĠUi Activity Monitor . getInstance (). add Activity ( tool WindowManager . project , Ġactivity , ĠMod ality State . NON _ MOD AL ) ĊĠĠĠ Ġtool WindowManager . activate Tool Window ( id , Ġforced , Ġauto Focus Contents ) ĊĠĠĠ Ġtool WindowManager . invoke Later ( Runnable Ġ{ ĊĠĠĠĠĠ Ġrunnable ?. run () ĊĠĠĠĠĠ ĠUi Activity Monitor . getInstance (). remove Activity ( tool WindowManager . project , Ġactivity ) ĊĠĠĠ Ġ}) ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun ĠisActive (): ĠBoolean Ġ{ ĊĠĠĠ ĠApplication Manager . getApplication (). assertIs Dispatch Thread () ĊĠĠĠ Ġval Ġframe Ġ= ĠWindow Manager Ex . getInstance Ex (). get Frame ( tool WindowManager . project ) ĊĠĠĠ Ġif Ġ( frame Ġ== Ġnull Ġ|| Ġ! frame . isActive Ġ|| Ġtool WindowManager . is Editor Component Active ) Ġ{ ĊĠĠĠĠĠ Ġreturn Ġfalse ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġval Ġaction Manager Ġ= ĠAction Manager . getInstance () ĊĠĠĠ Ġif Ġ( action Manager Ġis ĠAction ManagerImpl Ġ&& Ġ! action Manager . is Action Popup Stack Empty Ġ&& Ġ! action Manager . is Tool Window ContextMenu Visible ) Ġ{ ĊĠĠĠĠĠ Ġreturn Ġfalse ĊĠĠĠ Ġ} ĊĠĠĠ Ġelse Ġ{ ĊĠĠĠĠĠ Ġreturn Ġtool WindowManager . is Tool Window Active ( id ) Ġ|| Ġ( decorator ?. is Focused Ġ?: Ġfalse ) ĊĠĠĠ Ġ} ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġget Ready ( request or : ĠAny ): ĠAction Callback Ġ{ ĊĠĠĠ Ġval Ġresult Ġ= ĠAction Callback () ĊĠĠĠ Ġmy Showing . get Ready ( this ) ĊĠĠĠĠĠ Ġ. do When Done Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġcmd Ġ= ĠArrayList < Final izable Command >() ĊĠĠĠĠĠĠĠ Ġcmd . add ( object Ġ: ĠFinal izable Command ( null ) Ġ{ ĊĠĠĠĠĠĠĠĠĠ Ġoverride Ġfun Ġwill Change State (): ĠBoolean Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġreturn Ġfalse ĊĠĠĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠĠĠ Ġoverride Ġfun Ġrun () Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠIde Focus Manager . getInstance ( tool WindowManager . project ). do When Focus Set tles Down Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġif Ġ( content Manager . is Disposed ) Ġreturn @ do When Focus Set tles Down ĊĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġcontent Manager . get Ready ( request or ). notify ( result ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ}) ĊĠĠĠĠĠĠĠ Ġtool WindowManager . execute ( cmd ) ĊĠĠĠĠĠ Ġ} ĊĠĠĠ Ġreturn Ġresult ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġshow ( run nable : ĠRunnable ?) Ġ{ ĊĠĠĠ ĠApplication Manager . getApplication (). assertIs Dispatch Thread () ĊĠĠĠ Ġtool WindowManager . show Tool Window ( id ) ĊĠĠĠ Ġcall Later ( run nable ) ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġhide ( run nable : ĠRunnable ?) Ġ{ ĊĠĠĠ ĠApplication Manager . getApplication (). assertIs Dispatch Thread () ĊĠĠĠ Ġtool WindowManager . hide Tool Window ( id , Ġfalse ) ĊĠĠĠ Ġcall Later ( run nable ) ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġis Visible (): ĠBoolean Ġ{ ĊĠĠĠ Ġreturn Ġtool WindowManager . is Tool Window Registered ( id ) Ġ&& Ġtool WindowManager . is Tool Window Visible ( id ) ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġget Anchor (): ĠTool Window Anchor Ġ{ ĊĠĠĠ Ġreturn Ġtool WindowManager . get Tool Window Anchor ( id ) ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġset Anchor ( anchor : ĠTool Window Anchor , Ġrunnable : ĠRunnable ?) Ġ{ ĊĠĠĠ ĠApplication Manager . getApplication (). assertIs Dispatch Thread () ĊĠĠĠ Ġtool WindowManager . set Tool Window Anchor ( id , Ġanchor ) ĊĠĠĠ Ġcall Later ( run nable ) ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġis Split Mode (): ĠBoolean Ġ{ ĊĠĠĠ ĠApplication Manager . getApplication (). assertIs Dispatch Thread () ĊĠĠĠ Ġreturn Ġtool WindowManager . is Split Mode ( id ) ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġset Content Ui Type ( type : ĠTool Window Content Ui Type , Ġrunnable : ĠRunnable ?) Ġ{ ĊĠĠĠ ĠApplication Manager . getApplication (). assertIs Dispatch Thread () ĊĠĠĠ Ġtool WindowManager . setContent Ui Type ( id , Ġtype ) ĊĠĠĠ Ġcall Later ( run nable ) ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun ĠsetDefault Content Ui Type ( type : ĠTool Window Content Ui Type ) Ġ{ ĊĠĠĠ Ġtool WindowManager . setDefault Content Ui Type ( this , Ġtype ) ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun ĠgetContent Ui Type (): ĠTool Window Content Ui Type Ġ{ ĊĠĠĠ ĠApplication Manager . getApplication (). assertIs Dispatch Thread () ĊĠĠĠ Ġreturn Ġtool WindowManager . getContent Ui Type ( id ) ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġset Split Mode ( is Side Tool : ĠBoolean , Ġrunnable : ĠRunnable ?) Ġ{ ĊĠĠĠ ĠApplication Manager . getApplication (). assertIs Dispatch Thread () ĊĠĠĠ Ġtool WindowManager . set Side Tool ( id , Ġis Side Tool ) ĊĠĠĠ Ġcall Later ( run nable ) ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġset Auto Hide ( state : ĠBoolean ) Ġ{ ĊĠĠĠ ĠApplication Manager . getApplication (). assertIs Dispatch Thread () ĊĠĠĠ Ġtool WindowManager . set Tool Window Auto Hide ( id , Ġstate ) ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġis Auto Hide (): ĠBoolean Ġ{ ĊĠĠĠ ĠApplication Manager . getApplication (). assertIs Dispatch Thread () ĊĠĠĠ Ġreturn Ġtool WindowManager . is Tool Window Auto Hide ( id ) ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun ĠgetType (): ĠTool Window Type Ġ{ ĊĠĠĠ Ġreturn Ġtool WindowManager . get Tool Window Type ( id ) ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġset Type ( type : ĠTool Window Type , Ġrunnable : ĠRunnable ?) Ġ{ ĊĠĠĠ ĠApplication Manager . getApplication (). assertIs Dispatch Thread () ĊĠĠĠ Ġtool WindowManager . set Tool Window Type ( id , Ġtype ) ĊĠĠĠ Ġcall Later ( run nable ) ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġget Internal Type (): ĠTool Window Type Ġ{ ĊĠĠĠ ĠApplication Manager . getApplication (). assertIs Dispatch Thread () ĊĠĠĠ Ġreturn Ġtool WindowManager . get Tool Window Internal Type ( id ) ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġstretch Width ( value : ĠInt ) Ġ{ ĊĠĠĠ Ġtool WindowManager . stretch Width ( this , Ġvalue ) ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġstretch Height ( value : ĠInt ) Ġ{ ĊĠĠĠ Ġtool WindowManager . stretch Height ( this , Ġvalue ) ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġget Decorator () Ġ= Ġdecorator !! ĊĊĠ Ġoverride Ġfun Ġset Additional Gear Actions ( additional Gear Actions : ĠAction Group ?) Ġ{ ĊĠĠĠ Ġdecorator ?. set Additional Gear Actions ( additional Gear Actions ) ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun ĠsetTitle Actions ( var arg Ġactions : ĠAn Action ) Ġ{ ĊĠĠĠ Ġdecorator ?. setTitle Actions ( actions ) ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġset Tab Actions ( var arg Ġactions : ĠAn Action ) Ġ{ ĊĠĠĠ Ġdecorator ?. set Tab Actions ( actions ) ĊĠ Ġ} ĊĊĠ Ġfun Ġset Tab DoubleClick Actions ( var arg Ġactions : ĠAn Action ) Ġ{ ĊĠĠĠ Ġcontent Ui . set Tab DoubleClick Actions (* actions ) ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġset Available ( available : ĠBoolean , Ġrunnable : ĠRunnable ?) Ġ{ ĊĠĠĠ ĠApplication Manager . getApplication (). assertIs Dispatch Thread () ĊĠĠĠ Ġis Available Ġ= Ġavailable ĊĠĠĠ Ġtool WindowManager . tool Window PropertyChanged ( this , ĠTool Window Ex . PROP _ AVAILABLE ) ĊĠĠĠ Ġcall Later ( run nable ) ĊĠ Ġ} ĊĊĠ Ġprivate Ġfun Ġcall Later ( run nable : ĠRunnable ?) Ġ{ ĊĠĠĠ Ġif Ġ( run nable Ġ!= Ġnull ) Ġ{ ĊĠĠĠĠĠ Ġtool WindowManager . invoke Later ( run nable ) ĊĠĠĠ Ġ} ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġinstall Watcher ( content Manager : ĠContent Manager ) Ġ{ ĊĠĠĠ ĠContent Manager Watcher ( this , Ġcontent Manager ) ĊĠ Ġ} ĊĊĠ Ġ/** ĊĠĠ Ġ* Ġ@ return Ġ` true ` Ġif Ġthe Ġcomponent Ġpassed Ġinto Ġconstructor Ġis Ġnot Ġinstance Ġof ĊĠĠ Ġ* Ġ` Content Manager ` Ġclass . ĠOtherwise Ġit Ġdeleg ates Ġthe Ġfunctionality Ġto Ġthe ĊĠĠ Ġ* Ġpassed Ġcontent Ġmanager . ĊĠĠ Ġ*/ ĊĠ Ġoverride Ġfun Ġis Available (): ĠBoolean Ġ{ ĊĠĠĠ Ġreturn Ġis Available Ġ&& Ġcomponent Ġ!= Ġnull ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġget Component () Ġ= Ġcomponent ĊĊĠ Ġoverride Ġfun ĠgetContent Manager (): ĠContent Manager Ġ{ ĊĠĠĠ Ġensure Content Initialized () ĊĠĠĠ Ġreturn Ġcontent Manager ĊĠ Ġ} ĊĊĠ Ġ// Ġto Ġavoid Ġensure Content Initialized Ġcall Ġ- Ġmy Content Manager Ġcan Ġreport Ġcan Close Contents Ġwithout Ġfull Ġinitialization ĊĠ Ġfun Ġcan Close Contents () Ġ= Ġcontent Manager . can Close Contents () ĊĊĠ Ġoverride Ġfun Ġget Icon (): ĠIcon ? Ġ{ ĊĠĠĠ ĠApplication Manager . getApplication (). assertIs Dispatch Thread () ĊĠĠĠ Ġreturn Ġicon ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġget Title (): ĠString ? Ġ{ ĊĠĠĠ ĠApplication Manager . getApplication (). assertIs Dispatch Thread () ĊĠĠĠ Ġreturn Ġcontent Manager . selected Content ?. displayName ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġget Stripe Title (): ĠString Ġ{ ĊĠĠĠ ĠApplication Manager . getApplication (). assertIs Dispatch Thread () ĊĠĠĠ Ġreturn ĠObject Utils . notNull ( stripe Title , Ġid ) ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġset Icon ( icon : ĠIcon ) Ġ{ ĊĠĠĠ ĠApplication Manager . getApplication (). assertIs Dispatch Thread () ĊĠĠĠ Ġval Ġold Icon Ġ= Ġget Icon () ĊĠĠĠ Ġif Ġ( Event Log . LOG _ TOOL _ WINDOW _ ID Ġ!= Ġid ) Ġ{ ĊĠĠĠĠĠ Ġif Ġ( old Icon Ġ!== Ġicon Ġ&& ĊĠĠĠĠĠĠĠĠĠ Ġicon Ġ! is ĠLayer ed Icon Ġ&& ĊĠĠĠĠĠĠĠĠĠ Ġ( abs ( icon . icon Height Ġ- ĠJ BU IS cale . scale ( 1 3 f )) Ġ>= Ġ 1 Ġ|| Ġabs ( icon . icon Width Ġ- ĠJ BU IS cale . scale ( 1 3 f )) Ġ>= Ġ 1 )) Ġ{ ĊĠĠĠĠĠĠĠ ĠLOG . warn (" Tool Window Ġicons Ġshould Ġbe Ġ 1 3 x 1 3 . ĠPlease Ġfix ĠTool Window Ġ( ID : Ġ Ġ$ id ) Ġor Ġicon Ġ$ icon ") ĊĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĠĠĠ Ġthis . icon Ġ= ĠTool Window Icon ( icon , Ġid ) ĊĠĠĠ Ġtool WindowManager . tool Window PropertyChanged ( this , ĠTool Window Ex . PROP _ ICON ) ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun ĠsetTitle ( title : ĠString ) Ġ{ ĊĠĠĠ ĠApplication Manager . getApplication (). assertIs Dispatch Thread () ĊĠĠĠ Ġval Ġselected Ġ= Ġcontent Manager . selected Content ĊĠĠĠ Ġif Ġ( selected Ġ!= Ġnull ) Ġ{ ĊĠĠĠĠĠ Ġselected . displayName Ġ= Ġtitle ĊĠĠĠ Ġ} ĊĠĠĠ Ġtool WindowManager . tool Window PropertyChanged ( this , ĠTool Window Ex . PROP _ TITLE ) ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġset Stripe Title ( value : ĠString ) Ġ{ ĊĠĠĠ ĠApplication Manager . getApplication (). assertIs Dispatch Thread () ĊĠĠĠ Ġstripe Title Ġ= Ġvalue ĊĠĠĠ Ġtool WindowManager . tool Window PropertyChanged ( this , ĠTool Window Ex . PROP _ STRI PE _ TITLE ) ĊĠ Ġ} ĊĊĠ Ġfun Ġset Decorator ( value : ĠInternal Decorator ) Ġ{ ĊĠĠĠ Ġdecorator Ġ= Ġvalue ĊĠ Ġ} ĊĊĠ Ġfun Ġfire Activated () Ġ{ ĊĠĠĠ Ġdecorator ?. fire Activated () ĊĠ Ġ} ĊĊĠ Ġfun Ġfire Hidden () Ġ{ ĊĠĠĠ Ġdecorator ?. fire Hidden () ĊĠ Ġ} ĊĊĠ Ġfun Ġfire Hidden Side () Ġ{ ĊĠĠĠ Ġdecorator ?. fire Hidden Side () ĊĠ Ġ} ĊĊĠ Ġval Ġpopup Group : ĠAction Group ? ĊĠĠĠ Ġget () Ġ= Ġdecorator ?. create Popup Group () ĊĊĠ Ġoverride Ġfun ĠsetDefault State ( anchor : ĠTool Window Anchor ?, Ġtype : ĠTool Window Type ?, Ġfloating Bounds : ĠRectangle ?) Ġ{ ĊĠĠĠ Ġtool WindowManager . setDefault State ( this , Ġanchor , Ġtype , Ġfloating Bounds ) ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġset To Hide On Empty Content ( value : ĠBoolean ) Ġ{ ĊĠĠĠ Ġhide On Empty Content Ġ= Ġvalue ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġis To Hide On Empty Content () Ġ= Ġhide On Empty Content ĊĊĠ Ġoverride Ġfun ĠsetShow Stripe Button ( show : ĠBoolean ) Ġ{ ĊĠĠĠ Ġtool WindowManager . set Show Stripe Button ( id , Ġshow ) ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġis Show Stripe Button () Ġ= Ġtool WindowManager . is Show Stripe Button ( id ) ĊĊĠ Ġoverride Ġfun Ġis Disposed () Ġ= Ġcontent Manager . is Disposed ĊĊĠ Ġfun Ġset Content Factory ( value : ĠTool Window Factory ) Ġ{ ĊĠĠĠ Ġcontent Factory Ġ= Ġvalue ĊĠĠĠ Ġvalue . init ( this ) ĊĠ Ġ} ĊĊĠ Ġfun Ġensure Content Initialized () Ġ{ ĊĠĠĠ Ġval Ġcurrent Content Factory Ġ= Ġcontent Factory ĊĠĠĠ Ġif Ġ( current Content Factory Ġ!= Ġnull ) Ġ{ ĊĠĠĠĠĠ Ġ// Ġclear Ġit Ġfirst Ġto Ġavoid ĠSO E ĊĠĠĠĠĠ Ġthis . content Factory Ġ= Ġnull ĊĠĠĠĠĠ Ġcontent Manager . removeAll Contents ( false ) ĊĠĠĠĠĠ Ġcurrent Content Factory . create Tool Window Content ( tool WindowManager . project , Ġthis ) ĊĠĠĠ Ġ} ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġget Help Id () Ġ= Ġhelp Id ĊĊĠ Ġoverride Ġfun Ġset Help Id ( value : ĠString ) Ġ{ ĊĠĠĠ Ġhelp Id Ġ= Ġvalue ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġshow Content Popup ( input Event : ĠInput Event ) Ġ{ ĊĠĠĠ Ġcontent Ui . toggle Content Popup () ĊĠ Ġ} Ċ }