Interface IXMLCommandService
-
- All Known Implementing Classes:
XMLWorkspaceService
public interface IXMLCommandServiceService available to XML LS extensions to add/remove/execute commands via the XML LS- Author:
- Alex Boyko
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceIXMLCommandService.IDelegateCommandHandlerCommand handler to register with the workspace service
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidbeginCommandsRegistration()default voidendCommandsRegistration()CompletableFuture<Object>executeClientCommand(org.eclipse.lsp4j.ExecuteCommandParams command)Executes a command via the client.voidregisterCommand(String commandId, IXMLCommandService.IDelegateCommandHandler handler)Registers a command with the language servervoidunregisterCommand(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 commandhandler- 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()
-
-