Class XMLValidationFileCommand

  • All Implemented Interfaces:
    IXMLCommandService.IDelegateCommandHandler

    public class XMLValidationFileCommand
    extends AbstractDOMDocumentCommandHandler
    XML Command "xml.validation.current.file" to revalidate a give XML file which means:
    • remove the referenced grammar in the XML file from the Xerces grammar pool (used by the Xerces validation) and the content model documents cache (used by the XML completion/hover based on the grammar)
    • trigger the validation for the given XML file
    Author:
    Angelo ZERR
    • Method Detail

      • executeCommand

        protected Object executeCommand​(DOMDocument document,
                                        org.eclipse.lsp4j.ExecuteCommandParams params,
                                        SharedSettings sharedSettings,
                                        org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)
                                 throws Exception
        Description copied from class: AbstractDOMDocumentCommandHandler
        Executes a command
        Specified by:
        executeCommand in class AbstractDOMDocumentCommandHandler
        Parameters:
        document - the DOM document retrieve by the TextDocumentIdentifier argument.
        params - command execution parameters
        sharedSettings - the shared settings
        cancelChecker - check if cancel has been requested
        Returns:
        the result of the command
        Throws:
        Exception - the unhandled exception will be wrapped in org.eclipse.lsp4j.jsonrpc.ResponseErrorException and be wired back to the JSON-RPC protocol caller