public abstract class AbstractConstraintLocator extends java.lang.Object implements ConstraintLocator, ConstraintLocator.Descriptor
ConstraintLocator.Descriptor
Constructor and Description |
---|
AbstractConstraintLocator() |
Modifier and Type | Method and Description |
---|---|
protected java.util.Map<org.eclipse.emf.ecore.EObject,java.util.List<LeafConstrainingNode>> |
createLeafConstrainingNode(java.util.Map<org.eclipse.emf.ecore.EObject,java.util.List<LeafConstrainingNode>> map,
ValidityModel validityModel,
org.eclipse.emf.ecore.EObject constrainingType,
java.lang.Object constrainingObject,
java.lang.String label) |
java.util.Set<TypeURI> |
getAllTypes(ValidityManager validityManager,
org.eclipse.emf.ecore.EObject constrainingObject)
Return all typeURIs for a given type; typically this returns the supertype closure.
|
org.eclipse.emf.ecore.EObject |
getConstrainingType(org.eclipse.emf.ecore.EObject constrainedType,
java.lang.Object constrainingObject)
Return the RH constraining type that supplies the constrainingObject to the constrainedType.
|
ConstrainingURI |
getConstrainingURI(org.eclipse.emf.ecore.EObject eObject)
Return the URI that provides a distinct identity for a constraining element in the constraining elements view.
|
ConstraintLocator |
getConstraintLocator()
Return the ConstraintLocator described by this.
|
java.lang.Object |
getImage()
Return an icon to identify this kind of ConstraintLocator.
|
java.util.Collection<org.eclipse.emf.ecore.resource.Resource> |
getImports(org.eclipse.emf.ecore.EPackage ePackage,
org.eclipse.emf.ecore.resource.Resource resource)
Return any resources imported from within resource.
|
java.lang.String |
getLabel(org.eclipse.emf.ecore.EModelElement eObject)
Return a diagnostic label for eObject.
|
protected Severity |
getSeverity(org.eclipse.emf.common.util.Diagnostic diagnostic) |
java.lang.String |
getSourceExpression(LeafConstrainingNode node)
Return the source representation of the Constraint.
|
org.eclipse.emf.ecore.resource.Resource |
getSourceResource(LeafConstrainingNode node)
Return the Resource from which the Constraint was obtained.
|
TypeURI |
getTypeURI(org.eclipse.emf.ecore.EObject eObject)
Return the URI that provides a distinct identity for a constraining element when applied to a validatable element.
|
java.util.Set<TypeURI> |
getTypeURIs(ValidityManager validityManager,
org.eclipse.emf.ecore.EObject validatableObject)
Return the type URIs of all 'types' that provide constraints for validatableObject.
|
static void |
initialize()
Perform the standalone initialization of the ValidityManager constraint locator registry with all EMF-only ConstraintLocators.
|
java.lang.String |
toString() |
void |
validate(Result result,
ValidityManager validityManager,
org.eclipse.emf.common.util.Monitor monitor)
Update the validation result to include the verdict of the validation using validityManager to provide shared services.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getConstraints, getInstance, getName
public static void initialize()
@NonNull protected java.util.Map<org.eclipse.emf.ecore.EObject,java.util.List<LeafConstrainingNode>> createLeafConstrainingNode(@Nullable java.util.Map<org.eclipse.emf.ecore.EObject,java.util.List<LeafConstrainingNode>> map, @NonNull ValidityModel validityModel, @NonNull org.eclipse.emf.ecore.EObject constrainingType, @NonNull java.lang.Object constrainingObject, @NonNull java.lang.String label)
@NonNull public java.util.Set<TypeURI> getAllTypes(@NonNull ValidityManager validityManager, @NonNull org.eclipse.emf.ecore.EObject constrainingObject)
ConstraintLocator
getAllTypes
in interface ConstraintLocator
@NonNull public org.eclipse.emf.ecore.EObject getConstrainingType(@NonNull org.eclipse.emf.ecore.EObject constrainedType, @NonNull java.lang.Object constrainingObject)
ConstraintLocator
This just return constrainedType unless the RH pane has additional type information.
getConstrainingType
in interface ConstraintLocator
@Nullable public ConstrainingURI getConstrainingURI(@NonNull org.eclipse.emf.ecore.EObject eObject)
ConstraintLocator
getConstrainingURI
in interface ConstraintLocator
@NonNull public ConstraintLocator getConstraintLocator()
ConstraintLocator.Descriptor
getConstraintLocator
in interface ConstraintLocator.Descriptor
@Nullable public java.lang.Object getImage()
ConstraintLocator
getImage
in interface ConstraintLocator
@Nullable public java.util.Collection<org.eclipse.emf.ecore.resource.Resource> getImports(@NonNull org.eclipse.emf.ecore.EPackage ePackage, @NonNull org.eclipse.emf.ecore.resource.Resource resource)
ConstraintLocator
getImports
in interface ConstraintLocator
@NonNull public java.lang.String getLabel(@NonNull org.eclipse.emf.ecore.EModelElement eObject)
ConstraintLocator
getLabel
in interface ConstraintLocator
@NonNull protected Severity getSeverity(@NonNull org.eclipse.emf.common.util.Diagnostic diagnostic)
@Nullable public java.lang.String getSourceExpression(@NonNull LeafConstrainingNode node)
ConstraintLocator
getSourceExpression
in interface ConstraintLocator
@Nullable public org.eclipse.emf.ecore.resource.Resource getSourceResource(@NonNull LeafConstrainingNode node)
ConstraintLocator
getSourceResource
in interface ConstraintLocator
@Nullable public TypeURI getTypeURI(@NonNull org.eclipse.emf.ecore.EObject eObject)
ConstraintLocator
getTypeURI
in interface ConstraintLocator
@Nullable public java.util.Set<TypeURI> getTypeURIs(@NonNull ValidityManager validityManager, @NonNull org.eclipse.emf.ecore.EObject validatableObject)
ConstraintLocator
getTypeURIs
in interface ConstraintLocator
public java.lang.String toString()
toString
in class java.lang.Object
public void validate(@NonNull Result result, @NonNull ValidityManager validityManager, @Nullable org.eclipse.emf.common.util.Monitor monitor)
ConstraintLocator
validate
in interface ConstraintLocator