本文整理汇总了Java中org.eclipse.xpand2.XpandFacade.evaluate方法的典型用法代码示例。如果您正苦于以下问题:Java XpandFacade.evaluate方法的具体用法?Java XpandFacade.evaluate怎么用?Java XpandFacade.evaluate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.xpand2.XpandFacade
的用法示例。
在下文中一共展示了XpandFacade.evaluate方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: generatePluginXmlRt
import org.eclipse.xpand2.XpandFacade; //导入方法依赖的package包/类
private void generatePluginXmlRt(List<LanguageConfig> configs, XpandExecutionContext ctx) {
String filePath = fileExists(ctx, "plugin.xml", PLUGIN_RT) ? "plugin.xml_gen" : "plugin.xml";
deleteFile(ctx, filePath, PLUGIN_RT);
ctx.getOutput().openFile(filePath, PLUGIN_RT);
ctx.getOutput().getOutlet(PLUGIN_RT).addVetoStrategy(new EmptyPluginXmlVeto());
try {
XpandFacade facade = XpandFacade.create(ctx);
List<Grammar> grammars = getGrammars(configs);
facade.evaluate("org::eclipse::xtext::generator::Plugin::pre", grammars);
for (LanguageConfig conf : languageConfigs) {
conf.addToPluginXmlRt(conf, ctx);
if (isUiMergedIntoRt()) {
conf.addToPluginXmlUi(conf, ctx);
}
}
facade.evaluate("org::eclipse::xtext::generator::Plugin::post", grammars);
} finally {
ctx.getOutput().closeFile();
}
}
示例2: generatePluginXmlUi
import org.eclipse.xpand2.XpandFacade; //导入方法依赖的package包/类
private void generatePluginXmlUi(List<LanguageConfig> configs, XpandExecutionContext ctx) {
if (isUi() && !isUiMergedIntoRt()) {
String filePath = fileExists(ctx, "plugin.xml", PLUGIN_UI) ? "plugin.xml_gen" : "plugin.xml";
deleteFile(ctx, filePath, PLUGIN_UI);
ctx.getOutput().openFile(filePath, PLUGIN_UI);
try {
XpandFacade facade = XpandFacade.create(ctx);
List<Grammar> grammars = getGrammars(configs);
facade.evaluate("org::eclipse::xtext::generator::Plugin::pre", grammars);
for (LanguageConfig conf : languageConfigs) {
conf.addToPluginXmlUi(conf, ctx);
}
facade.evaluate("org::eclipse::xtext::generator::Plugin::post", grammars);
} finally {
ctx.getOutput().closeFile();
}
}
}
示例3: addToStandaloneSetup
import org.eclipse.xpand2.XpandFacade; //导入方法依赖的package包/类
private void addToStandaloneSetup(LanguageConfig config, XpandExecutionContext ctx) {
ctx.getOutput().openFile(naming.asPath(naming.setupImpl(config.getGrammar())) + ".java", SRC_GEN);
try {
XpandFacade facade = XpandFacade.create(ctx);
facade.evaluate("org::eclipse::xtext::generator::StandaloneSetup::pre", config.getGrammar(), config.getFileExtensions(config.getGrammar()));
config.addToStandaloneSetup(config, ctx);
facade.evaluate("org::eclipse::xtext::generator::StandaloneSetup::post", config.getGrammar());
} finally {
ctx.getOutput().closeFile();
}
}
示例4: generateGuiceModuleRt
import org.eclipse.xpand2.XpandFacade; //导入方法依赖的package包/类
private void generateGuiceModuleRt(LanguageConfig config, XpandExecutionContext ctx) {
XpandFacade facade = XpandFacade.create(ctx);
Set<Binding> bindings = config.getGuiceBindingsRt(config.getGrammar());
String superClassName = config.getDefaultRuntimeModuleClassName(config.getGrammar());
if (superClassName == null) {
superClassName = "org.eclipse.xtext.service.DefaultRuntimeModule";
}
facade.evaluate("org::eclipse::xtext::generator::GuiceModuleRt::generate", config.getGrammar(), superClassName, bindings,
config.getFileExtensions(config.getGrammar()));
}
示例5: generateGuiceModuleUi
import org.eclipse.xpand2.XpandFacade; //导入方法依赖的package包/类
private void generateGuiceModuleUi(LanguageConfig config, XpandExecutionContext ctx) {
if (isUi()) {
XpandFacade facade = XpandFacade.create(ctx);
Set<Binding> bindings = config.getGuiceBindingsUi(config.getGrammar());
String superClassName = config.getDefaultUiModuleClassName(config.getGrammar());
if (superClassName == null) {
superClassName = "org.eclipse.xtext.ui.DefaultUiModule";
}
facade.evaluate("org::eclipse::xtext::generator::GuiceModuleUi::generate", config.getGrammar(), superClassName, bindings);
}
}
示例6: enhanceProject
import org.eclipse.xpand2.XpandFacade; //导入方法依赖的package包/类
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("UTF-8");
execCtx.registerMetaModel(new JavaBeansMetaModel());
XpandFacade facade = XpandFacade.create(execCtx);
facade.evaluate("edu::byu::ee::phdl::ui::wizard::PhdlNewProject::main", getProjectInfo());
project.refreshLocal(IResource.DEPTH_INFINITE, monitor);
}
示例7: enhanceProject
import org.eclipse.xpand2.XpandFacade; //导入方法依赖的package包/类
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("UTF-8");
execCtx.registerMetaModel(new JavaBeansMetaModel());
XpandFacade facade = XpandFacade.create(execCtx);
facade.evaluate("org::xtext::example::hellobuck::ui::wizard::HelloBuckNewProject::main", getProjectInfo());
project.refreshLocal(IResource.DEPTH_INFINITE, monitor);
}
示例8: enhanceProject
import org.eclipse.xpand2.XpandFacade; //导入方法依赖的package包/类
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("UTF-8");
execCtx.registerMetaModel(new JavaBeansMetaModel());
XpandFacade facade = XpandFacade.create(execCtx);
facade.evaluate("com::euclideanspace::casl::ui::wizard::EditorNewProject::main", getProjectInfo());
project.refreshLocal(IResource.DEPTH_INFINITE, monitor);
}
示例9: enhanceProject
import org.eclipse.xpand2.XpandFacade; //导入方法依赖的package包/类
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("UTF-8");
execCtx.registerMetaModel(new JavaBeansMetaModel());
XpandFacade facade = XpandFacade.create(execCtx);
facade.evaluate("com::crubier::lil::ui::wizard::LilNewProject::main", getProjectInfo());
project.refreshLocal(IResource.DEPTH_INFINITE, monitor);
}
示例10: enhanceProject
import org.eclipse.xpand2.XpandFacade; //导入方法依赖的package包/类
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("UTF-8");
execCtx.registerMetaModel(new JavaBeansMetaModel());
XpandFacade facade = XpandFacade.create(execCtx);
facade.evaluate("org::example::smalljava::ui::wizard::SmallJavaNewProject::main", getProjectInfo());
project.refreshLocal(IResource.DEPTH_INFINITE, monitor);
}
示例11: generateExecutableExtensionsFactory
import org.eclipse.xpand2.XpandFacade; //导入方法依赖的package包/类
private void generateExecutableExtensionsFactory(LanguageConfig config, XpandExecutionContext exeCtx) {
XpandFacade facade = XpandFacade.create(exeCtx);
facade.evaluate("org::eclipse::xtext::generator::ExecutableExtensionFactory::file", config.getGrammar(),
getActivator());
}
示例12: generateActivator
import org.eclipse.xpand2.XpandFacade; //导入方法依赖的package包/类
private void generateActivator(List<LanguageConfig> configs, XpandExecutionContext exeCtx) {
XpandFacade facade = XpandFacade.create(exeCtx);
facade.evaluate("org::eclipse::xtext::generator::Activator::file", getGrammars(configs), getActivator());
}
示例13: generateManifest
import org.eclipse.xpand2.XpandFacade; //导入方法依赖的package包/类
private void generateManifest(XpandFacade facade, String name, String symbolicName, String version,
Set<String> exported, Set<String> requiredBundles, Set<String> imported, String activator) {
facade.evaluate("org::eclipse::xtext::generator::Manifest::file", name, symbolicName, version, exported,
requiredBundles, imported, activator);
}