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 class
GeneratorComponent.Outlet
-
Constructor Summary
Constructors Constructor Description GeneratorComponent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addOutlet(GeneratorComponent.Outlet out)
an outlet is defined by a name and a path.void
addSlot(java.lang.String slot)
adds a slot name to look forResource
s (the slot's contents might be a Resource or an Iterable of Resources).protected GeneratorDelegate
getCompiler()
protected IFileSystemAccess2
getConfiguredFileSystemAccess()
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()
void
invoke(org.eclipse.emf.mwe2.runtime.workflow.IWorkflowContext ctx)
void
postInvoke()
void
preInvoke()
void
setInjector(com.google.inject.Injector injector)
sets theInjector
to be used to obtain the usedIGenerator
instance.void
setRegister(ISetup setup)
registering anISetup
, which causes the execution ofISetup.createInjectorAndDoEMFRegistration()
the resultingInject
is 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 resultingInject
is stored and used to obtain the usedIGenerator
.
-
setInjector
public void setInjector(com.google.inject.Injector injector)
sets theInjector
to be used to obtain the usedIGenerator
instance.
-
addSlot
public void addSlot(java.lang.String slot)
adds a slot name to look forResource
s (the slot's contents might be a Resource or an Iterable of Resources).
-
preInvoke
public void preInvoke()
- Specified by:
preInvoke
in 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:
invoke
in 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:
postInvoke
in interfaceorg.eclipse.emf.mwe2.runtime.workflow.IWorkflowComponent
-
getOutputConfigurations
protected java.util.Map<java.lang.String,OutputConfiguration> getOutputConfigurations()
- Since:
- 2.3
-
-