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 voidafterGenerate(org.eclipse.emf.ecore.resource.Resource input, IFileSystemAccess2 fsa, IGeneratorContext context)Release any data that is no longer necessary after the generator ran.voidbeforeGenerate(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.voiddoGenerate(org.eclipse.emf.ecore.resource.Resource input, IFileSystemAccess fsa)voiddoGenerate(org.eclipse.emf.ecore.resource.Resource input, IFileSystemAccess2 fsa, IGeneratorContext context)Perform the code generation for the given input resource.voidgenerate(org.eclipse.emf.ecore.resource.Resource input, IFileSystemAccess2 fsa, IGeneratorContext context)IGeneratorgetLegacyGenerator()
-
-
-
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:IGenerator2Perform 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:
doGeneratein interfaceIGenerator2
-
beforeGenerate
public void beforeGenerate(org.eclipse.emf.ecore.resource.Resource input, IFileSystemAccess2 fsa, IGeneratorContext context)Description copied from interface:IGenerator2Before 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:
beforeGeneratein interfaceIGenerator2
-
afterGenerate
public void afterGenerate(org.eclipse.emf.ecore.resource.Resource input, IFileSystemAccess2 fsa, IGeneratorContext context)Description copied from interface:IGenerator2Release 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:
afterGeneratein interfaceIGenerator2
-
doGenerate
public void doGenerate(org.eclipse.emf.ecore.resource.Resource input, IFileSystemAccess fsa)- Specified by:
doGeneratein interfaceIGenerator- Parameters:
input- the input for which to generate resourcesfsa- file system access to be used to generate files
-
-