当前位置: 首页>>代码示例>>Java>>正文


Java XpandFacade.evaluate方法代码示例

本文整理汇总了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();
	}
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:21,代码来源:Generator.java

示例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();
		}
	}
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:19,代码来源:Generator.java

示例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();
	}
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:12,代码来源:Generator.java

示例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()));
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:11,代码来源:Generator.java

示例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);
	}
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:12,代码来源:Generator.java

示例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);
}
 
开发者ID:timofonic,项目名称:PHDL,代码行数:14,代码来源:PhdlProjectCreator.java

示例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);
}
 
开发者ID:LorenzoBettini,项目名称:Xtext-Xtend-Buckminster-Example,代码行数:14,代码来源:HelloBuckProjectCreator.java

示例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);
}
 
开发者ID:martinbaker,项目名称:caslEdit,代码行数:14,代码来源:EditorProjectCreator.java

示例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);
}
 
开发者ID:crubier,项目名称:lil,代码行数:14,代码来源:LilProjectCreator.java

示例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);
}
 
开发者ID:LorenzoBettini,项目名称:packtpub-xtext-book-examples,代码行数:14,代码来源:SmallJavaProjectCreator.java

示例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());
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:6,代码来源:Generator.java

示例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());
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:5,代码来源:Generator.java

示例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);
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:6,代码来源:Generator.java


注:本文中的org.eclipse.xpand2.XpandFacade.evaluate方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。