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
- Author:
- Sven Efftinge - Initial contribution and API
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GeneratorComponent
public GeneratorComponent()
setRegister
public void setRegister(ISetup setup)
- registering an
ISetup
, which causes the execution of ISetup.createInjectorAndDoEMFRegistration()
the resulting Inject
is stored and used to obtain the used IGenerator
.
setInjector
public void setInjector(com.google.inject.Injector injector)
- sets the
Injector
to be used to obtain the used IGenerator
instance.
addSlot
public void addSlot(java.lang.String slot)
- adds a slot name to look for
Resource
s (the slot's contents might be a Resource or an Iterable of Resources).
preInvoke
public void preInvoke()
- Specified by:
preInvoke
in interface org.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 interface org.eclipse.emf.mwe2.runtime.workflow.IWorkflowComponent
getCompiler
protected IGenerator getCompiler()
getConfiguredFileSystemAccess
protected IFileSystemAccess getConfiguredFileSystemAccess()
postInvoke
public void postInvoke()
- Specified by:
postInvoke
in interface org.eclipse.emf.mwe2.runtime.workflow.IWorkflowComponent