public class PivotConstraintLocator extends AbstractConstraintLocator
ConstraintLocator.Descriptor
Modifier and Type | Field and Description |
---|---|
static PivotConstraintLocator |
INSTANCE |
Constructor and Description |
---|
PivotConstraintLocator() |
Modifier and Type | Method and Description |
---|---|
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.
|
protected org.eclipse.emf.ecore.EObject |
getConstrainedESObject(EnvironmentFactory environmentFactory,
Constraint asConstraint) |
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.lang.Object |
getImage()
Return an icon to identify this kind of ConstraintLocator.
|
ConstraintLocator |
getInstance()
Return the singleton instance of this ConstraintLocator to avoid duplicate registrations.
|
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 constrainedObject)
Return the URI that provides a distinct identity for a constraining element when applied to a validatable element.
|
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.
|
createLeafConstrainingNode, getConstrainingType, getConstrainingURI, getConstraintLocator, getImports, getLabel, getSeverity, getTypeURIs, initialize, toString
@NonNull public static PivotConstraintLocator INSTANCE
@NonNull public java.util.Set<TypeURI> getAllTypes(@NonNull ValidityManager validityManager, @NonNull org.eclipse.emf.ecore.EObject constrainingObject)
ConstraintLocator
getAllTypes
in interface ConstraintLocator
getAllTypes
in class AbstractConstraintLocator
protected org.eclipse.emf.ecore.EObject getConstrainedESObject(@NonNull EnvironmentFactory environmentFactory, @NonNull Constraint asConstraint)
@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
public java.lang.Object getImage()
ConstraintLocator
getImage
in interface ConstraintLocator
getImage
in class AbstractConstraintLocator
@NonNull public ConstraintLocator getInstance()
ConstraintLocator
@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 AbstractConstraintLocator
@Nullable public TypeURI getTypeURI(@NonNull org.eclipse.emf.ecore.EObject constrainedObject)
ConstraintLocator
getTypeURI
in interface ConstraintLocator
getTypeURI
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