Package org.eclipse.xtext.generator
Class GeneratorComponent
- java.lang.Object
-
- org.eclipse.xtext.generator.GeneratorComponent
-
- All Implemented Interfaces:
org.eclipse.emf.mwe2.runtime.workflow.IWorkflowComponent
public class GeneratorComponent extends java.lang.Object implements org.eclipse.emf.mwe2.runtime.workflow.IWorkflowComponent
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGeneratorComponent.Outlet
-
Constructor Summary
Constructors Constructor Description GeneratorComponent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddOutlet(GeneratorComponent.Outlet out)an outlet is defined by a name and a path.voidaddSlot(java.lang.String slot)adds a slot name to look forResources (the slot's contents might be a Resource or an Iterable of Resources).protected GeneratorDelegategetCompiler()protected IFileSystemAccess2getConfiguredFileSystemAccess()protected java.util.Map<java.lang.String,java.lang.String>getOutlets()protected java.util.Map<java.lang.String,OutputConfiguration>getOutputConfigurations()protected java.util.List<java.lang.String>getSlotNames()voidinvoke(org.eclipse.emf.mwe2.runtime.workflow.IWorkflowContext ctx)voidpostInvoke()voidpreInvoke()voidsetInjector(com.google.inject.Injector injector)sets theInjectorto be used to obtain the usedIGeneratorinstance.voidsetRegister(ISetup setup)registering anISetup, which causes the execution ofISetup.createInjectorAndDoEMFRegistration()the resultingInjectis stored and used to obtain the usedIGenerator.
-
-
-
Method Detail
-
getSlotNames
protected java.util.List<java.lang.String> getSlotNames()
- Since:
- 2.4
-
getOutlets
protected java.util.Map<java.lang.String,java.lang.String> getOutlets()
- Since:
- 2.4
-
setRegister
public void setRegister(ISetup setup)
registering anISetup, which causes the execution ofISetup.createInjectorAndDoEMFRegistration()the resultingInjectis stored and used to obtain the usedIGenerator.
-
setInjector
public void setInjector(com.google.inject.Injector injector)
sets theInjectorto be used to obtain the usedIGeneratorinstance.
-
addSlot
public void addSlot(java.lang.String slot)
adds a slot name to look forResources (the slot's contents might be a Resource or an Iterable of Resources).
-
preInvoke
public void preInvoke()
- Specified by:
preInvokein interfaceorg.eclipse.emf.mwe2.runtime.workflow.IWorkflowComponent
-
addOutlet
public void addOutlet(GeneratorComponent.Outlet out)
an outlet is defined by a name and a path. The generator will internally choose one of the configured outlets when generating a file. the given path defines the root directory of the outlet.
-
invoke
public void invoke(org.eclipse.emf.mwe2.runtime.workflow.IWorkflowContext ctx)
- Specified by:
invokein interfaceorg.eclipse.emf.mwe2.runtime.workflow.IWorkflowComponent
-
getCompiler
protected GeneratorDelegate getCompiler()
- Since:
- 2.9
-
getConfiguredFileSystemAccess
protected IFileSystemAccess2 getConfiguredFileSystemAccess()
- Since:
- 2.9
-
postInvoke
public void postInvoke()
- Specified by:
postInvokein interfaceorg.eclipse.emf.mwe2.runtime.workflow.IWorkflowComponent
-
getOutputConfigurations
protected java.util.Map<java.lang.String,OutputConfiguration> getOutputConfigurations()
- Since:
- 2.3
-
-