Search in sources :

Example 6 with JavaBeansMetaModel

use of org.eclipse.xtend.type.impl.java.JavaBeansMetaModel in project applause by applause.

the class AbstractBuildStrategy method generate.

public void generate(Application app, Output output) {
    System.out.println("Generating code for platform project " + getPlatformProject().getName() + " from model in model project " + context.getBuiltProject());
    XpandExecutionContextImpl ctx = new XpandExecutionContextImpl(output, null, Collections.<String, Variable>emptyMap(), null, null);
    ctx.registerMetaModel(new JavaBeansMetaModel());
    try {
        XpandFacade.create(ctx).evaluate(getMainTemplateName(), app);
    } catch (Exception e) {
        e.printStackTrace();
    }
}
Also used : XpandExecutionContextImpl(org.eclipse.xpand2.XpandExecutionContextImpl) JavaBeansMetaModel(org.eclipse.xtend.type.impl.java.JavaBeansMetaModel) CoreException(org.eclipse.core.runtime.CoreException) VetoException(org.eclipse.xpand2.output.VetoException)

Aggregations

JavaBeansMetaModel (org.eclipse.xtend.type.impl.java.JavaBeansMetaModel)6 ExecutionContextImpl (org.eclipse.xtend.expression.ExecutionContextImpl)4 CompilationContext (com.avaloq.tools.ddk.xtext.expression.generator.CompilationContext)3 XpandExecutionContextImpl (org.eclipse.xpand2.XpandExecutionContextImpl)2 EmfRegistryMetaModel (org.eclipse.xtend.typesystem.emf.EmfRegistryMetaModel)2 Test (org.junit.Test)2 CompilerX (com.avaloq.tools.ddk.xtext.expression.generator.CompilerX)1 GenModelUtilX (com.avaloq.tools.ddk.xtext.expression.generator.GenModelUtilX)1 InputStreamReader (java.io.InputStreamReader)1 CoreException (org.eclipse.core.runtime.CoreException)1 ExtensionFile (org.eclipse.internal.xtend.xtend.ast.ExtensionFile)1 XpandFacade (org.eclipse.xpand2.XpandFacade)1 Outlet (org.eclipse.xpand2.output.Outlet)1 OutputImpl (org.eclipse.xpand2.output.OutputImpl)1 VetoException (org.eclipse.xpand2.output.VetoException)1 Type (org.eclipse.xtend.typesystem.Type)1