public interface ValidationProvider extends Validator
The ValidationService calls the providers after the validation with EMF. By providing an own provider, one can extend the EMF validation by providing additional validation rules.
As of the 1.23 release, for validation that requires the current view model context, consider using a subclass of the
nested ValidationProvider.ContextSensitive
class.
Modifier and Type | Interface and Description |
---|---|
static class |
ValidationProvider.ContextSensitive
A context-sensitive
ValidationProvider that implements the
validate(ViewModelContext, EObject)
method to the exclusion of Validator.validate(EObject) . |
Modifier and Type | Method and Description |
---|---|
default void |
setContext(ViewModelContext context)
Initialize me in the view model
context of the ValidationService to which I have been added. |
default void |
unsetContext(ViewModelContext context)
Notify me that I have been removed from the
ValidationService in the given context . |
default Iterable<? extends org.eclipse.emf.common.util.Diagnostic> |
validate(ViewModelContext context,
org.eclipse.emf.ecore.EObject object)
Validate an
object in a view model context . |
default void setContext(ViewModelContext context)
context
of the ValidationService
to which I have been added.
Note that I could be added to validation services in more than one context.context
- the context of the ValidationService
to which I have been addeddefault void unsetContext(ViewModelContext context)
ValidationService
in the given context
.
Note that I may still be used in validation services in other contexts.context
- the context of the ValidationService
from which I have been removeddefault Iterable<? extends org.eclipse.emf.common.util.Diagnostic> validate(ViewModelContext context, org.eclipse.emf.ecore.EObject object)
object
in a view model context
.context
- the view model context in which validation is occurringobject
- the object to validateobject
, or null
if noneCopyright © 2019. All rights reserved.