public abstract class LoadableConstraintProvider
extends org.eclipse.emf.validation.xml.XmlConstraintProvider
Pending improvement of the EMFv API:
Two ConstraintProviders should be specified for the one Category for the org.eclipse.emf.validation.constraintProviders extension point.
The first ConstraintProvider default-classed XmlConstraintProvider may have a single placeholder constraint that provides the initial content of the Model Validation Constraints Preference page.
The second ConstraintProvider deriving from LoadableConstraintProvider should have a Path-languaged constraint with an XML path parameter locating the model source of the loadable constraints. These will be loaded by the first validation run and repopulate the Preference page with their content.
See org.eclipse.ocl.examples.xtext.tests/plugin.xml for an example.
Derived implementations such as UMLProfileConstraintProvider should implement load to load the modeled constraints.
Modifier | Constructor and Description |
---|---|
protected |
LoadableConstraintProvider() |
Modifier and Type | Method and Description |
---|---|
static OCL |
getOCL() |
protected void |
installConstraint(Constraint constraint,
java.util.Set<org.eclipse.emf.validation.model.Category> categories) |
protected void |
installContents(java.lang.Iterable<? extends org.eclipse.emf.ecore.EObject> eContents,
java.util.Set<org.eclipse.emf.validation.model.Category> categories) |
protected void |
installDescriptor(org.eclipse.emf.validation.internal.util.XmlConstraintDescriptor descriptor,
java.lang.String namespaceIdentifier,
java.util.Set<org.eclipse.emf.validation.model.Category> categories) |
protected boolean |
installResource(org.eclipse.emf.ecore.resource.Resource asResource,
java.util.Set<org.eclipse.emf.validation.model.Category> categories) |
protected abstract boolean |
load(EnvironmentFactory environmentFactory,
org.eclipse.emf.common.util.URI uri,
java.util.Set<org.eclipse.emf.validation.model.Category> categories) |
void |
setInitializationData(org.eclipse.core.runtime.IConfigurationElement config,
java.lang.String propertyName,
java.lang.Object data) |
java.lang.String |
toString() |
@NonNull public static OCL getOCL()
protected void installConstraint(@NonNull Constraint constraint, @NonNull java.util.Set<org.eclipse.emf.validation.model.Category> categories)
protected void installContents(java.lang.Iterable<? extends org.eclipse.emf.ecore.EObject> eContents, @NonNull java.util.Set<org.eclipse.emf.validation.model.Category> categories)
protected void installDescriptor(@NonNull org.eclipse.emf.validation.internal.util.XmlConstraintDescriptor descriptor, java.lang.String namespaceIdentifier, @NonNull java.util.Set<org.eclipse.emf.validation.model.Category> categories)
protected boolean installResource(@NonNull org.eclipse.emf.ecore.resource.Resource asResource, @NonNull java.util.Set<org.eclipse.emf.validation.model.Category> categories)
protected abstract boolean load(@NonNull EnvironmentFactory environmentFactory, @NonNull org.eclipse.emf.common.util.URI uri, @NonNull java.util.Set<org.eclipse.emf.validation.model.Category> categories)
public void setInitializationData(org.eclipse.core.runtime.IConfigurationElement config, java.lang.String propertyName, java.lang.Object data) throws org.eclipse.core.runtime.CoreException
setInitializationData
in interface org.eclipse.core.runtime.IExecutableExtension
setInitializationData
in class org.eclipse.emf.validation.xml.XmlConstraintProvider
org.eclipse.core.runtime.CoreException
public java.lang.String toString()
toString
in class java.lang.Object