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

    The command registry manages commands and handlers.

    Implements

    Index

    Constructors

    Properties

    _commands: { [id: string]: Command } = {}
    _handlers: { [id: string]: CommandHandler[] } = {}
    _recent: string[] = []

    List of recently used commands.

    fireDidChange: (...arguments: []) => Promise<void> = ...
    onCommandsChanged: Event<void> = ...
    onCommandsChangedEmitter: Emitter<void> = ...
    onDidExecuteCommand: Event<CommandEvent> = ...

    An event is emitted when a command was executed.

    onDidExecuteCommandEmitter: Emitter<CommandEvent> = ...
    onWillExecuteCommand: Event<WillExecuteCommandEvent> = ...

    An event is emitted when a command is about to be executed.

    It can be used to install or activate a command handler.

    onWillExecuteCommandEmitter: Emitter<WillExecuteCommandEvent> = ...
    toUnregisterCommands: Map<string, Disposable> = ...

    Accessors

    Methods

    • eslint-disable-next-line @typescript-eslint/no-explicit-any

      Parameters

      • commandId: string
      • args: any[] = []

      Returns Promise<void>

    • eslint-disable-next-line @typescript-eslint/no-explicit-any

      Parameters

      • command: string
      • ...args: any[]

      Returns boolean

    • eslint-disable-next-line @typescript-eslint/no-explicit-any

      Parameters

      • command: string
      • ...args: any[]

      Returns boolean

    • eslint-disable-next-line @typescript-eslint/no-explicit-any

      Parameters

      • command: string
      • ...args: any[]

      Returns boolean

    • Register the given handler for the given command identifier.

      If there is already a handler for the given command then the given handler is registered as more specific, and has higher priority during enablement, visibility and toggle state evaluations.

      Parameters

      Returns Disposable