File tree 3 files changed +16
-1
lines changed
services/workbench/explorer
3 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -142,9 +142,14 @@ export class ExplorerController
142
142
}
143
143
case EXPLORER_TOGGLE_VERTICAL : {
144
144
this . emit ( EditorTreeEvent . onSplitEditorLayout ) ;
145
+ break ;
145
146
}
146
147
default :
147
- console . log ( 'onCollapseToolbar' ) ;
148
+ this . emit (
149
+ ExplorerEvent . onPanelToolbarClick ,
150
+ parentPanel ,
151
+ toolbarId
152
+ ) ;
148
153
}
149
154
} ;
150
155
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import { localize } from 'mo/i18n/localize';
5
5
6
6
export enum ExplorerEvent {
7
7
onClick = 'explorer.onClick' ,
8
+ onPanelToolbarClick = 'explorer.onPanelToolbarClick' ,
8
9
onCollapseChange = 'explorer.onCollapseChange' ,
9
10
onDeletePanel = 'explorer.onDeletePanel' ,
10
11
}
Original file line number Diff line number Diff line change @@ -45,6 +45,9 @@ export interface IExplorerService extends Component<IExplorer> {
45
45
* it execs when delete an explorer panel
46
46
*/
47
47
onDeletePanel ( callback : ( panel : IExplorerPanelItem ) => void ) : void ;
48
+ onPanelToolbarClick (
49
+ callback : ( panel : IExplorerPanelItem , toolbarId : string ) => void
50
+ ) : void ;
48
51
}
49
52
50
53
@singleton ( )
@@ -235,4 +238,10 @@ export class ExplorerService
235
238
public onDeletePanel ( callback : ( panel : IExplorerPanelItem ) => void ) {
236
239
this . subscribe ( ExplorerEvent . onDeletePanel , callback ) ;
237
240
}
241
+
242
+ public onPanelToolbarClick (
243
+ callback : ( panel : IExplorerPanelItem , toolbarId : string ) => void
244
+ ) {
245
+ this . subscribe ( ExplorerEvent . onPanelToolbarClick , callback ) ;
246
+ }
238
247
}
You can’t perform that action at this time.
0 commit comments