Search in sources :

Example 1 with XpandFacade

use of org.eclipse.xpand2.XpandFacade in project applause by applause.

the class ApplauseDslProjectCreator method enhanceProject.

protected void enhanceProject(final IProject project, final IProgressMonitor monitor) throws CoreException {
    OutputImpl output = new OutputImpl();
    output.addOutlet(new Outlet(false, getEncoding(), null, true, project.getLocation().makeAbsolute().toOSString()));
    XpandExecutionContextImpl execCtx = new XpandExecutionContextImpl(output, null);
    execCtx.getResourceManager().setFileEncoding("ISO-8859-1");
    execCtx.registerMetaModel(new JavaBeansMetaModel());
    XpandFacade facade = XpandFacade.create(execCtx);
    facade.evaluate("org::applause::lang::ui::wizard::ApplauseDslNewProject::main", getProjectInfo());
    project.refreshLocal(IResource.DEPTH_INFINITE, monitor);
}
Also used : Outlet(org.eclipse.xpand2.output.Outlet) XpandExecutionContextImpl(org.eclipse.xpand2.XpandExecutionContextImpl) JavaBeansMetaModel(org.eclipse.xtend.type.impl.java.JavaBeansMetaModel) OutputImpl(org.eclipse.xpand2.output.OutputImpl) XpandFacade(org.eclipse.xpand2.XpandFacade)

Aggregations

XpandExecutionContextImpl (org.eclipse.xpand2.XpandExecutionContextImpl)1 XpandFacade (org.eclipse.xpand2.XpandFacade)1 Outlet (org.eclipse.xpand2.output.Outlet)1 OutputImpl (org.eclipse.xpand2.output.OutputImpl)1 JavaBeansMetaModel (org.eclipse.xtend.type.impl.java.JavaBeansMetaModel)1