Package org.eclipse.lemminx.services.extensions.commands

## Interface IXMLCommandService

All Known Implementing Classes:
  `XMLWorkspaceService`

    public interface IXMLCommandService

Service available to XML LS extensions to add/remove/execute commands via the XML LS

Author:
  Alex Boyko

### Nested Class Summary

Nested Classes
`static interface` `IXMLCommandService.IDelegateCommandHandler` Command handler to register with the workspace service

### Method Summary

All Methods Instance Methods Abstract Methods Default Methods
`default void` `beginCommandsRegistration()`
`default void` `endCommandsRegistration()`
`CompletableFuture<Object>` `executeClientCommand​(org.eclipse.lsp4j.ExecuteCommandParams command)` Executes a command via the client.
`void` `registerCommand​(String commandId, IXMLCommandService.IDelegateCommandHandler handler)` Registers a command with the language server
`void` `unregisterCommand​(String commandId)` Unregisters the command from the language server

### Method Detail

#### registerCommand

    void registerCommand​(String commandId,
                         IXMLCommandService.IDelegateCommandHandler handler)

Registers a command with the language server

Parameters:
  `commandId` - unique id of the command
  `handler` - command handler function

#### unregisterCommand

    void unregisterCommand​(String commandId)

Unregisters the command from the language server

Parameters:
  `commandId` - unique id of the command to unregister

#### executeClientCommand

    CompletableFuture<Object> executeClientCommand​(org.eclipse.lsp4j.ExecuteCommandParams command)

Executes a command via the client. The command can be registered by any language server

Parameters:
  `command` - the LSP command
Returns:
  the result of the command

#### beginCommandsRegistration

    default void beginCommandsRegistration()

#### endCommandsRegistration

    default void endCommandsRegistration()