public class XtendXtext2EcorePostProcessor extends 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 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
MyDslPostProcessor.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)
IXtext2EcorePostProcessorprocess in interface IXtext2EcorePostProcessormetamodel - 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)
MyDslPostProcessor.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 String getExtensionName(GeneratedMetamodel metamodel)
protected org.eclipse.emf.common.util.URI getXtendFileLocation(GeneratedMetamodel metamodel)
Copyright © 2015. All Rights Reserved.