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
    • 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()