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

    The command contribution should be implemented to register custom commands and handler.

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    id: string = MiniBrowser.ID

    The widget open handler id.

    • A widget factory for this id should be registered.
    • Subclasses should not implement WidgetFactory to avoid exposing capabilities to create a widget outside of WidgetManager.
    label: string = ...
    labelProvider: LabelProvider
    locationMapperService: LocationMapperService
    miniBrowserService: MiniBrowserService
    onCreated: Event<MiniBrowser>

    Emit when a new widget is created.

    onCreatedEmitter: Emitter<MiniBrowser>
    openerService: OpenerService
    quickInputService: QuickInputService
    supportedExtensions: Map<string, number> = ...

    Instead of going to the backend with each file URI to ask whether it can handle the current file or not, we have this map of extension and priority pairs that we populate at application startup. The real advantage of this approach is the following: Lumino cannot run async code when invoking isEnabled/isVisible for the command handlers so the menu item would be always visible for the user even if the file type cannot be handled eventually. Hopefully, we could get rid of this hack once we have migrated the existing Lumino code to React.

    widgetManager: WidgetManager
    PREVIEW_URI: URI = ...

    Accessors

    • get all(): W[]

      Retrieves all open widgets that have been opened by this handler.

      Returns W[]

      all open widgets for this open handler.

    Methods

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

      Parameters

      • uri: URI

        the uri of the widget.

      Returns Promise<undefined | MiniBrowser>

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