use of org.eclipse.xpand2.XpandExecutionContextImpl in project xtext-xtend by eclipse.
the class ContentAssistParserGenerator method generate.
@Override
public void generate(Grammar grammar, XpandExecutionContext ctx) {
XpandExecutionContextImpl casted = (XpandExecutionContextImpl) ctx;
casted.registerAdvices("org::eclipse::xtend::core::parser::ContentAssistAntlrGrammarWithTokens");
super.generate(grammar, ctx);
}
use of org.eclipse.xpand2.XpandExecutionContextImpl 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);
}
use of org.eclipse.xpand2.XpandExecutionContextImpl 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();
}
}
Aggregations