public class NamesAreUniqueValidator extends AbstractDeclarativeValidator
An EValidator
implementation, that can be used via ComposedChecks
generically
to validate for duplicated exported objects.
It validates only the objects, that will be publicly available via an IResourceDescription
. Local
variables and similar objects have to be validated on their own. The INamesAreUniqueValidationHelper
provides
a convenient way to apply this kind of constraints.
AbstractDeclarativeValidator.MethodWrapper, AbstractDeclarativeValidator.State, AbstractDeclarativeValidator.StateAccess
org.eclipse.emf.ecore.EValidator.Descriptor, org.eclipse.emf.ecore.EValidator.PatternMatcher, org.eclipse.emf.ecore.EValidator.Registry, org.eclipse.emf.ecore.EValidator.SubstitutionLabelProvider, org.eclipse.emf.ecore.EValidator.ValidationDelegate
CURRENT_LANGUAGE_NAME, ISSUE_SEVERITIES
INSIGNIFICANT_INDEX
Constructor and Description |
---|
NamesAreUniqueValidator() |
Modifier and Type | Method and Description |
---|---|
void |
checkUniqueNamesInResourceOf(org.eclipse.emf.ecore.EObject eObject) |
void |
doCheckUniqueNames(org.eclipse.emf.ecore.resource.Resource resource,
CancelIndicator cancelIndicator) |
INamesAreUniqueValidationHelper |
getHelper() |
IResourceServiceProvider.Registry |
getResourceServiceProviderRegistry() |
void |
register(EValidatorRegistrar registrar) |
void |
setHelper(INamesAreUniqueValidationHelper helper) |
void |
setResourceServiceProviderRegistry(IResourceServiceProvider.Registry resourceDescriptionManagerRegistry) |
acceptError, acceptError, acceptInfo, acceptInfo, acceptWarning, acceptWarning, addIssue, addIssue, addIssue, addIssue, addIssue, addIssueToState, checkDone, checkIsFromCurrentlyCheckedResource, createDiagnostic, createDiagnostic, createMethodWrapper, error, error, error, error, error, error, error, error, getChain, getCheckMode, getContext, getCurrentMethod, getCurrentObject, getIssueSeverities, getMessageAcceptor, guard, info, info, info, info, info, info, info, info, internalValidate, isIgnored, newInstance, setInjector, setMessageAcceptor, toDiagnosticSeverity, warning, warning, warning, warning, warning, warning, warning, warning
getCurrentLanguage, getEPackages, isLanguageSpecific, isResponsible, validate, validate, validate
public void register(EValidatorRegistrar registrar)
register
in class AbstractInjectableValidator
public void checkUniqueNamesInResourceOf(org.eclipse.emf.ecore.EObject eObject)
public void doCheckUniqueNames(org.eclipse.emf.ecore.resource.Resource resource, CancelIndicator cancelIndicator)
public void setHelper(INamesAreUniqueValidationHelper helper)
public INamesAreUniqueValidationHelper getHelper()
public void setResourceServiceProviderRegistry(IResourceServiceProvider.Registry resourceDescriptionManagerRegistry)
public IResourceServiceProvider.Registry getResourceServiceProviderRegistry()