Search in sources :

Example 1 with EmfRegistryMetaModel

use of org.eclipse.xtend.typesystem.emf.EmfRegistryMetaModel in project dsl-devkit by dsldevkit.

the class CodeGenerationXTest method beforeAllTests.

@Override
protected void beforeAllTests() {
    super.beforeAllTests();
    final ExecutionContextImpl executionContext = new ExecutionContextImpl();
    executionContext.registerMetaModel(new JavaBeansMetaModel());
    executionContext.registerMetaModel(new EmfRegistryMetaModel());
    final CompilationContext context = new CompilationContext(executionContext, new GenModelUtilX());
    getTestInformation().putTestObject(CompilerX.class, new CompilerX(context));
}
Also used : GenModelUtilX(com.avaloq.tools.ddk.xtext.expression.generator.GenModelUtilX) CompilerX(com.avaloq.tools.ddk.xtext.expression.generator.CompilerX) ExecutionContextImpl(org.eclipse.xtend.expression.ExecutionContextImpl) EmfRegistryMetaModel(org.eclipse.xtend.typesystem.emf.EmfRegistryMetaModel) CompilationContext(com.avaloq.tools.ddk.xtext.expression.generator.CompilationContext) JavaBeansMetaModel(org.eclipse.xtend.type.impl.java.JavaBeansMetaModel)

Example 2 with EmfRegistryMetaModel

use of org.eclipse.xtend.typesystem.emf.EmfRegistryMetaModel in project xtext-core by eclipse.

the class XtendXtext2EcorePostProcessor method getExecutionContext.

/**
 * @param metamodel
 *            the metamodel to augment
 * @return the executionContext used to perform the xtend processing
 */
protected ExecutionContext getExecutionContext(GeneratedMetamodel metamodel) {
    if (executionContext == null) {
        ExecutionContextImpl executionContext = new ExecutionContextImpl();
        executionContext.registerMetaModel(new EmfRegistryMetaModel());
        executionContext.registerMetaModel(new JavaBeansMetaModel());
        this.executionContext = executionContext;
    }
    return executionContext;
}
Also used : ExecutionContextImpl(org.eclipse.xtend.expression.ExecutionContextImpl) EmfRegistryMetaModel(org.eclipse.xtend.typesystem.emf.EmfRegistryMetaModel) JavaBeansMetaModel(org.eclipse.xtend.type.impl.java.JavaBeansMetaModel)

Aggregations

ExecutionContextImpl (org.eclipse.xtend.expression.ExecutionContextImpl)2 JavaBeansMetaModel (org.eclipse.xtend.type.impl.java.JavaBeansMetaModel)2 EmfRegistryMetaModel (org.eclipse.xtend.typesystem.emf.EmfRegistryMetaModel)2 CompilationContext (com.avaloq.tools.ddk.xtext.expression.generator.CompilationContext)1 CompilerX (com.avaloq.tools.ddk.xtext.expression.generator.CompilerX)1 GenModelUtilX (com.avaloq.tools.ddk.xtext.expression.generator.GenModelUtilX)1