public interface ValidationService
EObject
s
honoring defined EValidators. Additionally custom Validator
s can be registered
i.e. if the feature set of the EValidators is insufficient.Modifier and Type | Method and Description |
---|---|
void |
addValidator(Validator validator)
Adds a validation provider to the list of known validators.
|
void |
cancel()
Allows to cancel the current validation run (if any).
|
boolean |
isBusy()
Returns true as long as a validation is in process.
|
<Filter extends ValidationFilter> |
registerValidationFilter(Filter filter)
Registers a validation filter.
|
void |
registerValidationResultListener(ValidationResultListener listener)
Registers a
ValidationResultListener . |
void |
removeValidator(Validator validator)
Removes a validation provider from the list of known validators.
|
void |
setSubstitutionLabelProvider(org.eclipse.emf.ecore.EValidator.SubstitutionLabelProvider substitutionLabelProvider)
Set a
EValidator.SubstitutionLabelProvider to be used for substituting labels in Diagnostic s. |
<Filter extends ValidationFilter> |
unregisterValidationFilter(Filter filter)
Unregisters a validation filter.
|
void |
unregisterValidationResultListener(ValidationResultListener listener)
Unregisters a
ValidationResultListener . |
org.eclipse.emf.common.util.Diagnostic |
validate(org.eclipse.emf.ecore.EObject eObject)
Validates the given eObject.
|
Set<org.eclipse.emf.common.util.Diagnostic> |
validate(Iterator<org.eclipse.emf.ecore.EObject> eObjects)
Uses the given iterator to validate all eObjects in a collection.
|
void addValidator(Validator validator)
validator
- the Validator
to addvoid removeValidator(Validator validator)
validator
- the Validator
to remove<Filter extends ValidationFilter> void registerValidationFilter(Filter filter)
Filter
- an ValidationFilter
implementationfilter
- the ValidationFilter
to register<Filter extends ValidationFilter> void unregisterValidationFilter(Filter filter)
Filter
- an ValidationFilter
implementationfilter
- the ValidationFilter
to unregistervoid registerValidationResultListener(ValidationResultListener listener)
ValidationResultListener
.listener
- the ValidationResultListener
to registervoid unregisterValidationResultListener(ValidationResultListener listener)
ValidationResultListener
.listener
- the ValidationResultListener
to unregistervoid setSubstitutionLabelProvider(org.eclipse.emf.ecore.EValidator.SubstitutionLabelProvider substitutionLabelProvider)
EValidator.SubstitutionLabelProvider
to be used for substituting labels in Diagnostic
s.substitutionLabelProvider
- the EValidator.SubstitutionLabelProvider
to be set for this serviceEValidator.SubstitutionLabelProvider
org.eclipse.emf.common.util.Diagnostic validate(org.eclipse.emf.ecore.EObject eObject)
eObject
- the eObject to validateDiagnostic
, or null if the eObject is filtered by a ValidationFilter
Set<org.eclipse.emf.common.util.Diagnostic> validate(Iterator<org.eclipse.emf.ecore.EObject> eObjects) throws ValidationCanceledException
eObjects
- the list to validateDiagnostic
sValidationCanceledException
- in case cancel()
has been calledboolean isBusy()
validate(EObject)
.
See cancel()
to interrupt a running validation process.void cancel()
validate(EObject)
.Copyright © 2018. All rights reserved.