Package org.eclipse.xtext.generator
Class GeneratorDelegate
- java.lang.Object
-
- org.eclipse.xtext.generator.GeneratorDelegate
-
- All Implemented Interfaces:
IGenerator
,IGenerator2
public class GeneratorDelegate extends java.lang.Object implements IGenerator, IGenerator2
- Since:
- 2.9
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.xtext.generator.IGenerator
IGenerator.NullGenerator
-
-
Constructor Summary
Constructors Constructor Description GeneratorDelegate()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterGenerate(org.eclipse.emf.ecore.resource.Resource input, IFileSystemAccess2 fsa, IGeneratorContext context)
Release any data that is no longer necessary after the generator ran.void
beforeGenerate(org.eclipse.emf.ecore.resource.Resource input, IFileSystemAccess2 fsa, IGeneratorContext context)
Before the generation is triggered, the resource or the entire resource set may be prepared such that no modification will happen whileIGenerator2.doGenerate(Resource, IFileSystemAccess2, IGeneratorContext)
is executed.void
doGenerate(org.eclipse.emf.ecore.resource.Resource input, IFileSystemAccess fsa)
void
doGenerate(org.eclipse.emf.ecore.resource.Resource input, IFileSystemAccess2 fsa, IGeneratorContext context)
Perform the code generation for the given input resource.void
generate(org.eclipse.emf.ecore.resource.Resource input, IFileSystemAccess2 fsa, IGeneratorContext context)
IGenerator
getLegacyGenerator()
-
-
-
Method Detail
-
getLegacyGenerator
public IGenerator getLegacyGenerator()
-
generate
public void generate(org.eclipse.emf.ecore.resource.Resource input, IFileSystemAccess2 fsa, IGeneratorContext context)
-
doGenerate
public void doGenerate(org.eclipse.emf.ecore.resource.Resource input, IFileSystemAccess2 fsa, IGeneratorContext context)
Description copied from interface:IGenerator2
Perform the code generation for the given input resource. Any number of files may be created or modified. Write operations to the given file system access may be processed asynchronous and are non-blocking if the given fsa is implementing that pattern. Read operations will happen in the background but are blocking.- Specified by:
doGenerate
in interfaceIGenerator2
-
beforeGenerate
public void beforeGenerate(org.eclipse.emf.ecore.resource.Resource input, IFileSystemAccess2 fsa, IGeneratorContext context)
Description copied from interface:IGenerator2
Before the generation is triggered, the resource or the entire resource set may be prepared such that no modification will happen whileIGenerator2.doGenerate(Resource, IFileSystemAccess2, IGeneratorContext)
is executed.- Specified by:
beforeGenerate
in interfaceIGenerator2
-
afterGenerate
public void afterGenerate(org.eclipse.emf.ecore.resource.Resource input, IFileSystemAccess2 fsa, IGeneratorContext context)
Description copied from interface:IGenerator2
Release any data that is no longer necessary after the generator ran. This is guaranteed to be called ifIGenerator2.beforeGenerate(Resource, IFileSystemAccess2, IGeneratorContext)
was called. It may be called several times. It may be called even ifIGenerator2.beforeGenerate(Resource, IFileSystemAccess2, IGeneratorContext)
was not called.- Specified by:
afterGenerate
in interfaceIGenerator2
-
doGenerate
public void doGenerate(org.eclipse.emf.ecore.resource.Resource input, IFileSystemAccess fsa)
- Specified by:
doGenerate
in interfaceIGenerator
- Parameters:
input
- the input for which to generate resourcesfsa
- file system access to be used to generate files
-
-