Interface: IEditorTreeService
services.IEditorTreeService
Hierarchy
Component
\<IEditor
>↳
IEditorTreeService
Table of contents
Properties
Methods
- onClose
- onCloseAll
- onCloseOthers
- onCloseSaved
- onContextMenu
- onLayout
- onSaveAll
- onSelect
- onToolbarClick
- subscribe
- unsubscribe
Properties
state
• Protected
Abstract
state: IEditor
Inherited from
Component.state
Defined in
Methods
onClose
▸ onClose(callback
): void
Callabck for close a certain tab
Parameters
Name | Type |
---|---|
callback | (tabId : UniqueId , groupId : UniqueId ) => void |
Returns
void
Defined in
src/services/workbench/explorer/editorTreeService.ts:11
onCloseAll
▸ onCloseAll(callback
): void
Callback for close all tabs When specify groupId, it'll close that group
Parameters
Name | Type |
---|---|
callback | (groupId? : UniqueId ) => void |
Returns
void
Defined in
src/services/workbench/explorer/editorTreeService.ts:34
onCloseOthers
▸ onCloseOthers(callback
): void
Callback for close others tabs except this tabItem
Parameters
Name | Type |
---|---|
callback | (tabItem : IEditorTab \<BuiltInEditorTabDataType >, groupId : UniqueId ) => void |
Returns
void
Defined in
src/services/workbench/explorer/editorTreeService.ts:16
onCloseSaved
▸ onCloseSaved(callback
): void
Callback for close saved tabs in this group
Parameters
Name | Type |
---|---|
callback | (groupId : UniqueId ) => void |
Returns
void
Defined in
src/services/workbench/explorer/editorTreeService.ts:23
onContextMenu
▸ onContextMenu(callback
): void
Callback for context menu click event which isn't in buit-in menus
Parameters
Name | Type |
---|---|
callback | (menu : IMenuItemProps , file : ITabProps \<any , any >, groupId : UniqueId ) => void |
Returns
void
Defined in
src/services/workbench/explorer/editorTreeService.ts:58
onLayout
▸ onLayout(callback
): void
Callback for adjust editor layout
Parameters
Name | Type |
---|---|
callback | () => void |
Returns
void
Defined in
src/services/workbench/explorer/editorTreeService.ts:53
onSaveAll
▸ onSaveAll(callback
): void
Callback for save all tabs When specify groupId, it'll save that group
Parameters
Name | Type |
---|---|
callback | (groupId? : UniqueId ) => void |
Returns
void
Defined in
src/services/workbench/explorer/editorTreeService.ts:40
onSelect
▸ onSelect(callback
): void
Callback for select tab in this group
Parameters
Name | Type |
---|---|
callback | (tabId : UniqueId , groupId : UniqueId ) => void |
Returns
void
Defined in
src/services/workbench/explorer/editorTreeService.ts:28
onToolbarClick
▸ onToolbarClick(callback
): void
Callback for the click event from toolbar buttons, except for saving button and closing button,
if you want to subscribe to the click events for these two buttons, please use the methods of onSaveAll
and onCloseAll
Parameters
Name | Type |
---|---|
callback | (toolbar : IActionBarItemProps \<any >, groupId? : UniqueId ) => void |
Returns
void
Defined in
src/services/workbench/explorer/editorTreeService.ts:46
subscribe
▸ subscribe(name
, listener
): void
Subscribe the service event
Parameters
Name | Type | Description |
---|---|---|
name | string | string [] | Event name |
listener | Function | Listener function |
Returns
void
Inherited from
Component.subscribe
Defined in
src/common/event/eventBus.ts:11
unsubscribe
▸ unsubscribe(name
, listener?
): void
Unsubscribe the specific event and the listener function
Parameters
Name | Type | Description |
---|---|---|
name | any | The event name |
listener? | Function | optional, it unsubscribes events via name if not pass the listener function |
Returns
void
Inherited from
Component.unsubscribe