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

    Namespace for dealing with commands. In short, a command is a function with a unique identifier. The function is sometimes also called command handler.

    Commands can be added using the registerCommand and registerTextEditorCommand functions. Registration can be split in two step: first register command without handler, second register handler by command id.

    Any contributed command are available to any extension, command can be invoked by executeCommand function.

    Simple example that register command:

    theia.commands.registerCommand({id:'say.hello.command'}, ()=>{
    console.log("Hello World!");
    });

    Simple example that invoke command:

    theia.commands.executeCommand('core.about');
    

    Functions

    executeCommand
    getCommands
    getKeyBinding
    registerCommand
    registerDiffInformationCommand
    registerHandler
    registerTextEditorCommand