Class FileContentGeneratorManager
- java.lang.Object
-
- org.eclipse.lemminx.extensions.generators.FileContentGeneratorManager
-
public class FileContentGeneratorManager extends Object
Generic file generator.By default the manager is able to generate :
- XML Schema from a given XML.
- DTD from a given XML.
-
-
Constructor Summary
Constructors Constructor Description FileContentGeneratorManager(IXMLFullFormatter formatter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <Source,Settings extends FileContentGeneratorSettings>
Stringgenerate(Source document, SharedSettings sharedSettings, Settings generatorSettings, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)Generates a file content (ex : XSD, DTD) from the given document sourcedocument(ex: XML) by using the given settingsgeneratorSettings.voidregisterGenerator(IFileContentGenerator<?,?> generator, Class<? extends FileContentGeneratorSettings> generatorKey)Register the given generator by using settings class as key generator.
-
-
-
Constructor Detail
-
FileContentGeneratorManager
public FileContentGeneratorManager(IXMLFullFormatter formatter)
-
-
Method Detail
-
registerGenerator
public void registerGenerator(IFileContentGenerator<?,?> generator, Class<? extends FileContentGeneratorSettings> generatorKey)
Register the given generator by using settings class as key generator.- Parameters:
generator- the generator.generatorKey- the key of the generator identified by the settings class.
-
generate
public <Source,Settings extends FileContentGeneratorSettings> String generate(Source document, SharedSettings sharedSettings, Settings generatorSettings, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)
Generates a file content (ex : XSD, DTD) from the given document sourcedocument(ex: XML) by using the given settingsgeneratorSettings.- Parameters:
document- the document source (ex : XML).sharedSettings- the shared settings.generatorSettings- the generator settings.formatter- the formatter.- Returns:
- the result of the generation of the file content (ex : XSD, DTD) from
the given document source
document(ex: XML) by using the given settingsgeneratorSettings.
-
-