org.eclipse.emf.ecore.impl.EValidatorRegistryImpl Java Examples
The following examples show how to use
org.eclipse.emf.ecore.impl.EValidatorRegistryImpl.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ValidatorTester.java From xtext-eclipse with Eclipse Public License 2.0 | 6 votes |
@Inject public ValidatorTester(T validator, EValidatorRegistrar registrar, @Named(Constants.LANGUAGE_NAME) final String languageName) { this.validator = validator; EValidator.Registry originalRegistry = registrar.getRegistry(); EValidatorRegistryImpl newRegistry = new EValidatorRegistryImpl(); registrar.setRegistry(newRegistry); this.validator.register(registrar); diagnostician = new Diagnostician(newRegistry) { @Override public java.util.Map<Object,Object> createDefaultContext() { java.util.Map<Object,Object> map = super.createDefaultContext(); map.put(AbstractInjectableValidator.CURRENT_LANGUAGE_NAME, languageName); return map; } }; registrar.setRegistry(originalRegistry); validatorCalled = false; }
Example #2
Source File: ValidatorTester.java From xtext-core with Eclipse Public License 2.0 | 6 votes |
@Inject public ValidatorTester(T validator, EValidatorRegistrar registrar, @Named(Constants.LANGUAGE_NAME) final String languageName) { this.validator = validator; EValidator.Registry originalRegistry = registrar.getRegistry(); EValidatorRegistryImpl newRegistry = new EValidatorRegistryImpl(); registrar.setRegistry(newRegistry); this.validator.register(registrar); diagnostician = new Diagnostician(newRegistry) { @Override public java.util.Map<Object,Object> createDefaultContext() { java.util.Map<Object,Object> map = super.createDefaultContext(); map.put(AbstractInjectableValidator.CURRENT_LANGUAGE_NAME, languageName); return map; } }; registrar.setRegistry(originalRegistry); validatorCalled = false; }
Example #3
Source File: SGraphJavaValidatorTester.java From statecharts with Eclipse Public License 1.0 | 5 votes |
@Inject public SGraphJavaValidatorTester(T validator, EValidatorRegistrar registrar, String languageName) { super(validator, registrar, languageName); EValidatorRegistryImpl newRegistry = new EValidatorRegistryImpl(); newRegistry.put(SGraphPackage.eINSTANCE, validator); diagnostician = new Diagnostician(newRegistry); }
Example #4
Source File: AbstractTypeProviderTest.java From xtext-extras with Eclipse Public License 2.0 | 4 votes |
@Before public void setUp() throws Exception { EValidator.Registry registry = new EValidatorRegistryImpl(EValidator.Registry.INSTANCE); registry.put(TypesPackage.eINSTANCE, new EObjectValidator()); diagnostician = new Diagnostician(registry); }
Example #5
Source File: AbstractTypeProviderTest.java From xtext-extras with Eclipse Public License 2.0 | 4 votes |
@Before public void setUp() throws Exception { EValidator.Registry registry = new EValidatorRegistryImpl(EValidator.Registry.INSTANCE); registry.put(TypesPackage.eINSTANCE, new EObjectValidator()); diagnostician = new Diagnostician(registry); }
Example #6
Source File: AbstractTypeProviderTest.java From xtext-eclipse with Eclipse Public License 2.0 | 4 votes |
@Before public void setUp() throws Exception { EValidator.Registry registry = new EValidatorRegistryImpl(EValidator.Registry.INSTANCE); registry.put(TypesPackage.eINSTANCE, new EObjectValidator()); diagnostician = new Diagnostician(registry); }
Example #7
Source File: RegisteredValidatorTester.java From xtext-eclipse with Eclipse Public License 2.0 | 4 votes |
public RegisteredValidatorTester(EPackage pkg, EValidator val) { Registry reg = new EValidatorRegistryImpl(); reg.put(pkg, val); this.diagnostician = new Diagnostician(reg); }