Interface CommandHandler

A command handler is an implementation of a command.

A command can have multiple handlers but they should be active in different contexts, otherwise first active will be executed.

interface CommandHandler {
    onDidChangeEnabled?: Event<void>;
    execute(...args): any;
    isEnabled?(...args): boolean;
    isToggled?(...args): boolean;
    isVisible?(...args): boolean;
}

Hierarchy (view full)

Implemented by

Properties

onDidChangeEnabled?: Event<void>

Methods

  • Execute this handler.

    Don't call it directly, use CommandService.executeCommand instead.

    Parameters

    • Rest ...args: any[]

    Returns any