Theia API Documentation v1.65.0
    Preparing search index...

    Represents the main editor area which consists of multiple groups which contain tabs.

    interface TabGroups {
        activeTabGroup: TabGroup;
        all: readonly TabGroup[];
        onDidChangeTabGroups: Event<TabGroupChangeEvent>;
        onDidChangeTabs: Event<TabChangeEvent>;
        close(
            tab: Tab | readonly Tab[],
            preserveFocus?: boolean,
        ): Thenable<boolean>;
        close(
            tabGroup: TabGroup | readonly TabGroup[],
            preserveFocus?: boolean,
        ): Thenable<boolean>;
    }
    Index

    Properties

    activeTabGroup: TabGroup

    The currently active group.

    all: readonly TabGroup[]

    All the groups within the group container.

    onDidChangeTabGroups: Event<TabGroupChangeEvent>

    An event which fires when tab groups have changed.

    onDidChangeTabs: Event<TabChangeEvent>

    An event which fires when tabs have changed.

    Methods

    • Closes the tab. This makes the tab object invalid and the tab should no longer be used for further actions. Note: In the case of a dirty tab, a confirmation dialog will be shown which may be cancelled. If cancelled the tab is still valid

      Parameters

      • tab: Tab | readonly Tab[]

        The tab to close.

      • OptionalpreserveFocus: boolean

        When true focus will remain in its current position. If false it will jump to the next tab.

      Returns Thenable<boolean>

      A promise that resolves to true when all tabs have been closed.

    • Closes the tab group. This makes the tab group object invalid and the tab group should no longer be used for further actions.

      Parameters

      • tabGroup: TabGroup | readonly TabGroup[]

        The tab group to close.

      • OptionalpreserveFocus: boolean

        When true focus will remain in its current position.

      Returns Thenable<boolean>

      A promise that resolves to true when all tab groups have been closed.