public class XtendXtext2EcorePostProcessor extends java.lang.Object implements IXtext2EcorePostProcessor
IXtext2EcorePostProcessor
which delegates the actual post-processing behavior to
an Xtend
based implementation.Constructor and Description |
---|
XtendXtext2EcorePostProcessor() |
Modifier and Type | Method and Description |
---|---|
protected void |
clearCachedXtendFile()
Sets cached Xtend file to null so it can be reloaded in
loadXtendFile(GeneratedMetamodel) |
protected void |
fireXtendFileLoaded()
notify subclasses that the xtend file was successfully loaded
|
protected org.eclipse.xtend.expression.ExecutionContext |
getExecutionContext(GeneratedMetamodel metamodel) |
protected java.lang.String |
getExtensionName(GeneratedMetamodel metamodel) |
protected org.eclipse.emf.mwe.core.resources.ResourceLoader |
getResourceLoader(GeneratedMetamodel metamodel) |
protected org.eclipse.emf.common.util.URI |
getXtendFileLocation(GeneratedMetamodel metamodel) |
protected org.eclipse.xtend.expression.Resource |
loadXtendFile(GeneratedMetamodel metamodel)
Expects an Xtend file named
MyDsl PostProcessor.ext with an extension with signature
process(xtext::GeneratedMetamodel) in the same folder as the grammar file. |
void |
process(GeneratedMetamodel metamodel)
Process the given metatmodel (e.g. set default values, make references bi-directional, ...)
|
public void process(GeneratedMetamodel metamodel)
IXtext2EcorePostProcessor
process
in interface IXtext2EcorePostProcessor
metamodel
- the metatmodel to augmentprotected org.eclipse.emf.mwe.core.resources.ResourceLoader getResourceLoader(GeneratedMetamodel metamodel)
metamodel
- the metamodel to augmentprotected org.eclipse.xtend.expression.ExecutionContext getExecutionContext(GeneratedMetamodel metamodel)
metamodel
- the metamodel to augmentprotected org.eclipse.xtend.expression.Resource loadXtendFile(GeneratedMetamodel metamodel)
MyDsl
PostProcessor.ext with an extension with signature
process(xtext::GeneratedMetamodel) in the same folder as the grammar file.metamodel
- the metamodel to augmentprotected void fireXtendFileLoaded()
protected final void clearCachedXtendFile()
loadXtendFile(GeneratedMetamodel)
protected java.lang.String getExtensionName(GeneratedMetamodel metamodel)
protected org.eclipse.emf.common.util.URI getXtendFileLocation(GeneratedMetamodel metamodel)