Creates a new instance of GeneratedContentManager
.
Optional
workspaceDirs: (string | URI)[]Optional list of workspace directories (as strings or URIs). Used to determine the workspace URI for documents.
Adds a new target to the generator output. The target name must be unique.
The target to add with name and other settings.
Creates a new file with the given content and metadata.
The target name for which the file is generated. Defaults to the default target.
The relative path of the file to create.
The content of the file.
Whether to overwrite the file if it already exists.
The path to the source document from which the file was generated.
Creates a new GeneratorManager
for the given AST model.
The AST model for which to create the generator manager.
A new instance of GeneratorManager
associated with the provided model.
Returns the generated content for the provided target or the default target.
Optional
targetName: stringThe target name for which to get the generated content. If not provided, the default target is used.
A GeneratedContent
map containing the generated files.
Writes the generated content for a target to the file system asynchronously.
Existing files are only overwritten if the overwrite flag is set (default behavior). If the file already exists and the content is the same, the file is not overwritten, preserving the timestamp and not triggering file system file change events.
The output directory where the files will be written.
Optional
target: stringThe target name whose content should be written. If not provided, the default target is used.
Manages the collection of generated content for code generation.
The
GeneratedContentManager
allows you to:Example
Example
See
GeneratorManager