Options
All
  • Public
  • Public/Protected
  • All
Menu

Class VSXExtensionEditorManager

Hierarchy

Index

Constructors

constructor

Properties

Readonly id

id: string = ...

Readonly onCreated

onCreated: Event<VSXExtensionEditor>

Emit when a new widget is created.

Protected Readonly onCreatedEmitter

onCreatedEmitter: Emitter<VSXExtensionEditor>

Protected Readonly shell

shell: ApplicationShell

Protected Readonly widgetManager

widgetManager: WidgetManager

Accessors

all

  • get all(): W[]
  • Retrieves all open widgets that have been opened by this handler.

    Returns W[]

    all open widgets for this open handler.

Methods

canHandle

  • canHandle(uri: default): number

closeAll

  • Closes all widgets that have been opened by this open handler.

    Parameters

    • Optional options: CloseOptions

      the close options that should be applied to all widgets.

    Returns Promise<VSXExtensionEditor[]>

    a promise of all closed widgets that resolves after they have been closed.

Protected createWidgetOptions

Protected doOpen

  • Parameters

    Returns Promise<void>

getByUri

  • Tries to get an existing widget for the given uri.

    Parameters

    • uri: default

      the uri of the widget.

    Returns Promise<undefined | VSXExtensionEditor>

    a promise that resolves to the existing widget or undefined if no widget for the given uri exists.

getOrCreateByUri

  • Return an existing widget for the given uri or creates a new one.

    It does not open a widget, use {@link WidgetOpenHandler#open} instead.

    Parameters

    • uri: default

      uri of the widget.

    Returns Promise<VSXExtensionEditor>

    a promise of the existing or newly created widget.

Protected getOrCreateWidget

  • getOrCreateWidget(uri: default, options?: WidgetOpenerOptions): Promise<VSXExtensionEditor>
  • Parameters

    • uri: default
    • Optional options: WidgetOpenerOptions

    Returns Promise<VSXExtensionEditor>

Protected getWidget

  • getWidget(uri: default, options?: WidgetOpenerOptions): Promise<undefined | VSXExtensionEditor>
  • Parameters

    • uri: default
    • Optional options: WidgetOpenerOptions

    Returns Promise<undefined | VSXExtensionEditor>

Protected init

  • init(): void
  • Returns void

open

  • Open a widget for the given uri and options. Reject if the given options are not widget options or a widget cannot be opened.

    Parameters

    • uri: default

      the uri of the resource that should be opened.

    • Optional options: WidgetOpenerOptions

      the widget opener options.

    Returns Promise<VSXExtensionEditor>

    promise of the widget that resolves when the widget has been opened.

Protected tryGetPendingWidget

  • Parameters

    • uri: default
    • Optional options: WidgetOpenerOptions

    Returns undefined | VSXExtensionEditor | PromiseLike<VSXExtensionEditor>