Class GenerateXMLFromGrammarCommand
java.lang.Object
org.eclipse.lemminx.extensions.contentmodel.commands.GenerateXMLFromGrammarCommand
- All Implemented Interfaces:
IXMLCommandService.IDelegateCommandHandler
public class GenerateXMLFromGrammarCommand
extends Object
implements IXMLCommandService.IDelegateCommandHandler
XML Command "xml.grammar.generate" to generate an XML document from a given
grammar (XSD, DTD, RelaxNG, etc.) and a root element name.
The command parameters ExecuteCommandParams must be filled with 2 or 3
parameters:
- grammar URI (String) : the grammar file URI.
- root element name (String) : the local name of the root element to generate.
- generation settings (optional,
XMLGenerationSettings) : non-persistent settings overriding the persistent ones (e.g. from a wizard). If not provided, persistent settings from client configuration are used, including profile resolution.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionGenerateXMLFromGrammarCommand(ContentModelManager contentModelManager, ProgressSupport progressSupport) -
Method Summary
Modifier and TypeMethodDescriptionexecuteCommand(org.eclipse.lsp4j.ExecuteCommandParams params, SharedSettings sharedSettings, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker) Executes a command.voidupdateContentModelSettings(ContentModelSettings contentModelSettings) Updates the persistent content model settings (called when client configuration changes).
-
Field Details
-
COMMAND_ID
- See Also:
-
-
Constructor Details
-
GenerateXMLFromGrammarCommand
public GenerateXMLFromGrammarCommand(ContentModelManager contentModelManager, ProgressSupport progressSupport)
-
-
Method Details
-
updateContentModelSettings
Updates the persistent content model settings (called when client configuration changes).- Parameters:
contentModelSettings- the content model settings.
-