@@ -42,17 +42,17 @@ abstract class AbstractToolbarMenuWrapper {
4242 protected abstract icon : string | undefined ;
4343 protected abstract tooltip : string | undefined ;
4444 protected abstract text : string | undefined ;
45- protected abstract executeCommand ( e : React . MouseEvent < HTMLDivElement , MouseEvent > ) : void ;
45+ protected abstract executeCommand ( widget : Widget , e : React . MouseEvent < HTMLDivElement , MouseEvent > ) : void ;
4646
47- isEnabled ( ) : boolean {
47+ isEnabled ( widget : Widget ) : boolean {
4848 if ( CommandMenu . is ( this . menuNode ) ) {
49- return this . menuNode . isEnabled ( ) ;
49+ return this . menuNode . isEnabled ( widget ) ;
5050 }
5151 return true ;
5252 }
53- isToggled ( ) : boolean {
53+ isToggled ( widget : Widget ) : boolean {
5454 if ( CommandMenu . is ( this . menuNode ) && this . menuNode . isToggled ) {
55- return ! ! this . menuNode . isToggled ( ) ;
55+ return ! ! this . menuNode . isToggled ( widget ) ;
5656 }
5757 return false ;
5858 }
@@ -101,7 +101,7 @@ abstract class AbstractToolbarMenuWrapper {
101101 return < div key = { this . id } className = { TabBarToolbar . Styles . TAB_BAR_TOOLBAR_ITEM + ' enabled menu' } >
102102 < div className = { codicon ( icon , true ) }
103103 title = { this . text }
104- onClick = { e => this . executeCommand ( e ) }
104+ onClick = { e => this . executeCommand ( widget , e ) }
105105 />
106106 < div className = { ACTION_ITEM } onClick = { event => this . showPopupMenu ( widget , this . menuPath ! , event , contextMatcher ) } >
107107 < div className = { codicon ( 'chevron-down' ) + ' chevron' } />
@@ -111,7 +111,7 @@ abstract class AbstractToolbarMenuWrapper {
111111 return < div key = { this . id } className = { TabBarToolbar . Styles . TAB_BAR_TOOLBAR_ITEM + ' enabled menu' } >
112112 < div className = { codicon ( icon , true ) }
113113 title = { this . text }
114- onClick = { e => this . executeCommand ( e ) }
114+ onClick = { e => this . executeCommand ( widget , e ) }
115115 />
116116 </ div > ;
117117 }
@@ -130,9 +130,9 @@ export class ToolbarMenuNodeWrapper extends AbstractToolbarMenuWrapper implement
130130 super ( commandRegistry , menuRegistry , contextKeyService , contextMenuRenderer ) ;
131131 }
132132
133- executeCommand ( e : React . MouseEvent < HTMLDivElement , MouseEvent > ) : void {
133+ executeCommand ( widget : Widget , e : React . MouseEvent < HTMLDivElement , MouseEvent > ) : void {
134134 if ( CommandMenu . is ( this . menuNode ) ) {
135- this . menuNode . run ( ) ;
135+ this . menuNode . run ( widget ) ;
136136 }
137137 }
138138
@@ -173,7 +173,7 @@ export class ToolbarSubmenuWrapper extends AbstractToolbarMenuWrapper implements
173173 return this . toolbarItem . command ? this . commandRegistry . isEnabled ( this . toolbarItem . command , widget ) : ! ! this . toolbarItem . menuPath ;
174174 }
175175
176- protected executeCommand ( e : React . MouseEvent < HTMLElement > , widget ?: Widget ) : void {
176+ protected executeCommand ( widget : Widget , e : React . MouseEvent < HTMLElement > ) : void {
177177 e . preventDefault ( ) ;
178178 e . stopPropagation ( ) ;
179179
0 commit comments