Protected Readonly_Unidirectional alias map from a target command id to the alias command ids registered for it. When the target (for instance a native Theia command) is executed, events also fire for its aliases (for instance the VS Code command ids).
Protected Readonly_Protected Readonly_Protected_List of recently used commands.
Protected ReadonlycontributionProtected ReadonlyexecutionHow often each command is currently executing, so that an alias event can be skipped while the alias command itself is on the stack.
ProtectedfireProtected ReadonlyloggerReadonlyonProtected ReadonlyonReadonlyonAn event is emitted when a command was executed.
Protected ReadonlyonReadonlyonAn event is emitted when a command is about to be executed.
It can be used to install or activate a command handler.
Protected ReadonlyonProtected ReadonlytoGet all registered commands identifiers.
Get all registered commands.
Clear the list of recently used commands.
ProtecteddoProtecteddoeslint-disable-next-line @typescript-eslint/no-explicit-any
Protectedfireeslint-disable-next-line @typescript-eslint/no-explicit-any
eslint-disable-next-line @typescript-eslint/no-explicit-any
Returns the alias ids registered for the given command id.
Returns with all handlers for the given command. If the command does not have any handlers, or the command is not registered, returns an empty array.
ProtectedgetThe aliases of the given command that are not executing themselves, and for which events are therefore still owed.
eslint-disable-next-line @typescript-eslint/no-explicit-any
eslint-disable-next-line @typescript-eslint/no-explicit-any
eslint-disable-next-line @typescript-eslint/no-explicit-any
eslint-disable-next-line @typescript-eslint/no-explicit-any
eslint-disable-next-line @typescript-eslint/no-explicit-any
Register a unidirectional alias from a target command to an alias command. When the target command is executed, onDidExecuteCommand and onWillExecuteCommand fire for the alias id as well.
This does not affect command handlers, enablement or visibility, only event emission. A target may carry several aliases.
No event is fired for an alias while that alias is executing, which keeps an alias command that delegates to its target from reporting itself twice. The check is by command id rather than by call stack, so an unrelated execution of the alias that happens to overlap suppresses the event as well.
the alias command id, for instance a VS Code command id
the target command id, for instance the native Theia command id
a Disposable that removes this alias again
Register the given command and handler if present.
Throw if a command is already registered for the given command identifier.
Optionalhandler: CommandHandlerRegister 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.
Unregister command from the registry
The command registry manages commands and handlers.