• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java CompositeEValidator类的典型用法和代码示例

java 2次浏览

本文整理汇总了Java中org.eclipse.xtext.validation.CompositeEValidator的典型用法代码示例。如果您正苦于以下问题:Java CompositeEValidator类的具体用法?Java CompositeEValidator怎么用?Java CompositeEValidator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

CompositeEValidator类属于org.eclipse.xtext.validation包,在下文中一共展示了CompositeEValidator类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: makeCopyOfGlobalState

点赞 3

import org.eclipse.xtext.validation.CompositeEValidator; //导入依赖的package包/类
public static GlobalStateMemento makeCopyOfGlobalState() {
	GlobalStateMemento memento = new GlobalStateMemento();
	memento.validatorReg = new HashMap<EPackage, Object>(EValidator.Registry.INSTANCE);
	for(Map.Entry<EPackage, Object> validatorEntry: memento.validatorReg.entrySet()) {
		Object existingValue = validatorEntry.getValue();
		if (existingValue instanceof CompositeEValidator) {
			validatorEntry.setValue(((CompositeEValidator) existingValue).getCopyAndClearContents());
		}
	}
	memento.epackageReg = new HashMap<String, Object>(EPackage.Registry.INSTANCE);
	memento.protocolToFactoryMap = new HashMap<String, Object>(Resource.Factory.Registry.INSTANCE.getProtocolToFactoryMap());
	memento.extensionToFactoryMap = new HashMap<String, Object>(Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap());
	memento.contentTypeIdentifierToFactoryMap = new HashMap<String, Object>(Resource.Factory.Registry.INSTANCE.getContentTypeToFactoryMap());

	memento.protocolToServiceProviderMap = new HashMap<String, Object>(IResourceServiceProvider.Registry.INSTANCE.getProtocolToFactoryMap());
	memento.extensionToServiceProviderMap = new HashMap<String, Object>(IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap());
	memento.contentTypeIdentifierToServiceProviderMap = new HashMap<String, Object>(IResourceServiceProvider.Registry.INSTANCE.getContentTypeToFactoryMap());
	return memento;
}
 

开发者ID:eclipse,
项目名称:xtext-core,
代码行数:20,
代码来源:GlobalRegistries.java

示例2: configureIScopeProviderDelegate

点赞 2

import org.eclipse.xtext.validation.CompositeEValidator; //导入依赖的package包/类
@Override
public void configureIScopeProviderDelegate(Binder binder) {
	binder.bind(org.eclipse.xtext.scoping.IScopeProvider.class)
			.annotatedWith(com.google.inject.name.Names
					.named(org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider.NAMED_DELEGATE))
			.to(org.yakindu.sct.model.stext.scoping.StextImportAwareScopeProvider.class);
	binder.bind(ITypeSystem.class).toInstance(getTypeSystem());
	binder.bind(boolean.class).annotatedWith(Names.named(CompositeEValidator.USE_EOBJECT_VALIDATOR))
			.toInstance(false);
}
 

开发者ID:Yakindu,
项目名称:statecharts,
代码行数:11,
代码来源:STextRuntimeModule.java

示例3: assertValidatorExists

点赞 2

import org.eclipse.xtext.validation.CompositeEValidator; //导入依赖的package包/类
protected void assertValidatorExists() {
	EValidator eValidator = EValidator.Registry.INSTANCE.getEValidator(XtextPackage.eINSTANCE);
	Assert.assertNotNull(eValidator);
	Assert.assertTrue(eValidator instanceof CompositeEValidator);
}
 

开发者ID:eclipse,
项目名称:xtext-core,
代码行数:6,
代码来源:Bug367679Test.java

示例4: getGuiceBindingsRt

点赞 2

import org.eclipse.xtext.validation.CompositeEValidator; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public Set<Binding> getGuiceBindingsRt(final Grammar grammar) {

  return new BindFactory().addTypeToTypeEagerSingleton(getJavaValidatorName(grammar, ""), getJavaValidatorName(grammar, "")).addTypeToType(CompositeEValidator.class.getName(), ValidCompositeEValidator.class.getName()).getBindings(); //$NON-NLS-1$ //$NON-NLS-2$
}
 

开发者ID:dsldevkit,
项目名称:dsl-devkit,
代码行数:7,
代码来源:ValidValidatorFragment.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)