public class UMLConstraintLocator extends AbstractPivotConstraintLocator
AbstractPivotConstraintLocator.AbstractConstraintLocator
ConstraintLocator.Descriptor
Modifier and Type | Field and Description |
---|---|
static UMLConstraintLocator |
INSTANCE |
Constructor and Description |
---|
UMLConstraintLocator() |
Modifier and Type | Method and Description |
---|---|
protected void |
appendPath(java.lang.StringBuilder s,
org.eclipse.uml2.uml.NamedElement eObject) |
java.util.Set<TypeURI> |
getAllTypes(ValidityManager validityManager,
org.eclipse.emf.ecore.EObject constrainingType)
Return all typeURIs for a given type; typically this returns the supertype closure.
|
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.
|
java.util.Map<org.eclipse.emf.ecore.EObject,java.util.List<LeafConstrainingNode>> |
getConstraints(ValidityModel validityModel,
org.eclipse.emf.ecore.EPackage ePackage,
java.util.Set<org.eclipse.emf.ecore.resource.Resource> resources,
org.eclipse.emf.common.util.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.
|
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.
|
ConstraintLocator |
getInstance()
Return the singleton instance of this ConstraintLocator to avoid duplicate registrations.
|
java.lang.String |
getLabel(org.eclipse.emf.ecore.EModelElement eObject)
Return a diagnostic label for eObject.
|
java.lang.String |
getName()
Return a descriptive name for this kind of constraint.
|
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.
|
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.
|
createEvaluationVisitor, getQuery, initialize
createLeafConstrainingNode, getConstrainingType, getConstraintLocator, getImage, getSeverity, toString
@NonNull public static UMLConstraintLocator INSTANCE
protected void appendPath(@NonNull java.lang.StringBuilder s, @NonNull org.eclipse.uml2.uml.NamedElement eObject)
@NonNull public java.util.Set<TypeURI> getAllTypes(@NonNull ValidityManager validityManager, @NonNull org.eclipse.emf.ecore.EObject constrainingType)
ConstraintLocator
getAllTypes
in interface ConstraintLocator
getAllTypes
in class AbstractConstraintLocator
@Nullable public ConstrainingURI getConstrainingURI(@NonNull org.eclipse.emf.ecore.EObject eObject)
ConstraintLocator
getConstrainingURI
in interface ConstraintLocator
getConstrainingURI
in class AbstractConstraintLocator
@Nullable public java.util.Map<org.eclipse.emf.ecore.EObject,java.util.List<LeafConstrainingNode>> getConstraints(@NonNull ValidityModel validityModel, @NonNull org.eclipse.emf.ecore.EPackage ePackage, @NonNull java.util.Set<org.eclipse.emf.ecore.resource.Resource> resources, @NonNull org.eclipse.emf.common.util.Monitor monitor)
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
getImports
in class AbstractConstraintLocator
@NonNull public ConstraintLocator getInstance()
ConstraintLocator
@NonNull public java.lang.String getLabel(@NonNull org.eclipse.emf.ecore.EModelElement eObject)
ConstraintLocator
getLabel
in interface ConstraintLocator
getLabel
in class AbstractConstraintLocator
@NonNull public java.lang.String getName()
ConstraintLocator
@Nullable public java.lang.String getSourceExpression(@NonNull LeafConstrainingNode node)
ConstraintLocator
getSourceExpression
in interface ConstraintLocator
getSourceExpression
in class AbstractConstraintLocator
@Nullable public org.eclipse.emf.ecore.resource.Resource getSourceResource(@NonNull LeafConstrainingNode node)
ConstraintLocator
getSourceResource
in interface ConstraintLocator
getSourceResource
in class AbstractPivotConstraintLocator
@Nullable public TypeURI getTypeURI(@NonNull org.eclipse.emf.ecore.EObject eObject)
ConstraintLocator
getTypeURI
in interface ConstraintLocator
getTypeURI
in class AbstractConstraintLocator
@Nullable public java.util.Set<TypeURI> getTypeURIs(@NonNull ValidityManager validityManager, @NonNull org.eclipse.emf.ecore.EObject validatableObject)
ConstraintLocator
getTypeURIs
in interface ConstraintLocator
getTypeURIs
in class AbstractConstraintLocator
public void validate(@NonNull Result result, @NonNull ValidityManager validityManager, @Nullable org.eclipse.emf.common.util.Monitor monitor)
ConstraintLocator
validate
in interface ConstraintLocator
validate
in class AbstractConstraintLocator