Skip to main content

Interface: IEditorTreeService

services.IEditorTreeService

Hierarchy

  • Component\<IEditor>

    IEditorTreeService

Table of contents

Properties

Methods

Properties

state

Protected Abstract state: IEditor

Inherited from

Component.state

Defined in

src/react/component.ts:44

Methods

onClose

onClose(callback): void

Callabck for close a certain tab

Parameters

NameType
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

NameType
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

NameType
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

NameType
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

NameType
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

NameType
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

NameType
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

NameType
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

NameType
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

NameTypeDescription
namestring | string[]Event name
listenerFunctionListener 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

NameTypeDescription
nameanyThe event name
listener?Functionoptional, it unsubscribes events via name if not pass the listener function

Returns

void

Inherited from

Component.unsubscribe

Defined in

src/common/event/eventBus.ts:39