public interface ConstraintLocator
The org.eclipse.ocl.examples.emf.validation.validity.constraint_locator extension point is used to register ConstraintLocators.
Modifier and Type | Interface and Description |
---|---|
static interface |
ConstraintLocator.Descriptor |
Modifier and Type | Method and Description |
---|---|
Set<TypeURI> |
getAllTypes(ValidityManager validityManager,
EObject constrainingObject)
Return all typeURIs for a given type; typically this returns the supertype closure.
|
EObject |
getConstrainingType(EObject constrainedType,
Object constrainingObject)
Return the RH constraining type that supplies the constrainingObject to the constrainedType.
|
ConstrainingURI |
getConstrainingURI(EObject eObject)
Return the URI that provides a distinct identity for a constraining element in the constraining elements view.
|
Map<EObject,List<LeafConstrainingNode>> |
getConstraints(ValidityModel validityModel,
EPackage ePackage,
Set<Resource> resources,
Monitor monitor)
Return a constrainedType-to-constraint map for all types in the given resources that have an ePackage whose URI complies with
the registration of this ConstraintLocator.
|
Object |
getImage()
Return an icon to identify this kind of ConstraintLocator.
|
Collection<Resource> |
getImports(EPackage ePackage,
Resource resource)
Return any resources imported from within resource.
|
ConstraintLocator |
getInstance()
Return the singleton instance of this ConstraintLocator to avoid duplicate registrations.
|
String |
getLabel(EModelElement eObject)
Return a diagnostic label for eObject.
|
String |
getName()
Return a descriptive name for this kind of constraint.
|
String |
getSourceExpression(LeafConstrainingNode node)
Return the source representation of the Constraint.
|
Resource |
getSourceResource(LeafConstrainingNode node)
Return the Resource from which the Constraint was obtained.
|
TypeURI |
getTypeURI(EObject eObject)
Return the URI that provides a distinct identity for a constraining element when applied to a validatable element.
|
Set<TypeURI> |
getTypeURIs(ValidityManager validityManager,
EObject validatableObject)
Return the type URIs of all 'types' that provide constraints for validatableObject.
|
void |
validate(Result result,
ValidityManager validityManager,
Monitor monitor)
Update the validation result to include the verdict of the validation using validityManager to provide shared services.
|
Set<TypeURI> getAllTypes(ValidityManager validityManager, EObject constrainingObject)
EObject getConstrainingType(EObject constrainedType, Object constrainingObject)
This just return constrainedType unless the RH pane has additional type information.
ConstrainingURI getConstrainingURI(EObject eObject)
Map<EObject,List<LeafConstrainingNode>> getConstraints(ValidityModel validityModel, EPackage ePackage, Set<Resource> resources, Monitor monitor)
Object getImage()
Collection<Resource> getImports(EPackage ePackage, Resource resource)
ConstraintLocator getInstance()
String getLabel(EModelElement eObject)
String getName()
String getSourceExpression(LeafConstrainingNode node)
Resource getSourceResource(LeafConstrainingNode node)
TypeURI getTypeURI(EObject eObject)
Set<TypeURI> getTypeURIs(ValidityManager validityManager, EObject validatableObject)
void validate(Result result, ValidityManager validityManager, Monitor monitor)
monitor
- Copyright © 2005, 2018 IBM Corporation and others. All Rights Reserved.