Class CheckBoundGrammarCommand

java.lang.Object
org.eclipse.lemminx.services.extensions.commands.AbstractDOMDocumentCommandHandler
org.eclipse.lemminx.extensions.contentmodel.commands.CheckBoundGrammarCommand
All Implemented Interfaces:
IXMLCommandService.IDelegateCommandHandler

public class CheckBoundGrammarCommand extends AbstractDOMDocumentCommandHandler
XML Command "xml.check.bound.grammar" to verify if an XML document already has a bound grammar/schema, opened from the command palette.
  • Field Details

  • Constructor Details

  • Method Details

    • 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
    • canBindWithGrammar

      public static boolean canBindWithGrammar(DOMDocument document)
      Returns true if the given DOM document can be bound with a given grammar and false otherwise.
      Parameters:
      document - the DOM document.
      Returns:
      true if the given DOM document can be bound with a given grammar and false otherwise.