Class GenerateGrammarFromXMLCommand
java.lang.Object
org.eclipse.lemminx.services.extensions.commands.AbstractDOMDocumentCommandHandler
org.eclipse.lemminx.extensions.contentmodel.commands.GenerateGrammarFromXMLCommand
- All Implemented Interfaces:
IXMLCommandService.IDelegateCommandHandler
XML Command "xml.grammar.generateFromXml" to generate a grammar file (XSD,
DTD, RelaxNG) from a given XML document and optionally bind it.
The command parameters ExecuteCommandParams must be filled with:
- arg 0: document URI (
TextDocumentIdentifier) - the XML document. - arg 1: grammar type (String) - "xsd", "dtd", or "rng".
- arg 2: grammar file URI (String) - the target grammar file URI.
- arg 3: binding type (String, optional) - "xsi:noNamespaceSchemaLocation", "xsi:schemaLocation", "xml-model", "DOCTYPE", or null for file association (client handles binding).
Returns a GenerateGrammarFromXMLCommand.GenerateGrammarResult with the generated grammar content
and an optional binding text edit.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classResult returned by the generate grammar command. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionGenerateGrammarFromXMLCommand(IXMLDocumentProvider documentProvider, IComponentProvider componentProvider) -
Method Summary
Modifier and TypeMethodDescriptionprotected ObjectexecuteCommand(DOMDocument document, org.eclipse.lsp4j.ExecuteCommandParams params, SharedSettings sharedSettings, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker) Executes a commandMethods inherited from class org.eclipse.lemminx.services.extensions.commands.AbstractDOMDocumentCommandHandler
executeCommand
-
Field Details
-
COMMAND_ID
- See Also:
-
-
Constructor Details
-
GenerateGrammarFromXMLCommand
public GenerateGrammarFromXMLCommand(IXMLDocumentProvider documentProvider, IComponentProvider componentProvider)
-
-
Method Details