public class ActivityUtil
extends com.ibm.xtools.uml.msl.internal.util.UMLActionUtil
Constructor and Description |
---|
ActivityUtil() |
Modifier and Type | Method and Description |
---|---|
static org.eclipse.emf.ecore.EClass |
getCompletedActivityEdgeType(org.eclipse.uml2.uml.ActivityEdge edge,
org.eclipse.emf.ecore.EObject source,
org.eclipse.emf.ecore.EObject target)
Method to determine the correct type of an ActivityEdge
based on its source and target.
|
static org.eclipse.gmf.runtime.emf.type.core.IElementType |
getCreateActivityEdgeRequestType(org.eclipse.emf.ecore.EObject source,
org.eclipse.emf.ecore.EObject target)
Method to discover the specific type of an ActivityEdge
on creation time.
|
static org.eclipse.gmf.runtime.emf.type.core.IElementType |
getReorientActivityEdgeType(org.eclipse.uml2.uml.ActivityEdge edge,
org.eclipse.emf.ecore.EObject source,
org.eclipse.emf.ecore.EObject target)
Method to discover the specific type of an ActivityEdge
while reorienting it to a different source or target.
|
static boolean |
hasStereotypesSupport(java.util.List<org.eclipse.uml2.uml.Stereotype> stereotypes,
org.eclipse.emf.ecore.EClass eClass)
Method to check if a list of stereotypes is applicable to an EClass.
|
static boolean |
isConnectable(org.eclipse.emf.ecore.EObject src,
org.eclipse.emf.ecore.EObject tgt)
Method to determine whether two elements can be connected by an edge
|
static boolean |
isCreatableAndConnectable(org.eclipse.emf.ecore.EObject src,
org.eclipse.emf.ecore.EObject targetParent)
Method to determine whether a target parent element supports creating
a child that can be connected by an edge to the source
|
static boolean |
isSourceAPNConstraintPassed(org.eclipse.emf.ecore.EObject src)
Checks to see if an activity parameter node acting as the source
of a relationship satisfies certain UML constraints.
|
static boolean |
isStructuredActivityNodePinEdge(org.eclipse.emf.ecore.EObject source,
org.eclipse.emf.ecore.EObject target) |
static boolean |
isTargetAPNConstraintPassed(org.eclipse.emf.ecore.EObject tgt)
Checks to see if an activity parameter node acting as the target
of a relationship satisfies certain UML constraints.
|
static boolean |
supportsCreateRelationship(org.eclipse.emf.ecore.EObject src,
org.eclipse.emf.ecore.EObject tgt,
org.eclipse.emf.ecore.EClass type)
Test if this provider can honor the supplid command.
|
static org.eclipse.core.runtime.IStatus |
supportsCreateRelationshipWithStatus(org.eclipse.emf.ecore.EObject src,
org.eclipse.emf.ecore.EObject tgt,
org.eclipse.emf.ecore.EClass type)
Test if this provider can honor the supplid command.
|
static boolean |
supportsReorientRelationship(org.eclipse.uml2.uml.ActivityEdge edge,
org.eclipse.emf.ecore.EObject src,
org.eclipse.emf.ecore.EObject tgt,
boolean isSourceReorient)
Return a boolean indicating if the relationship may be reoriented.
|
static org.eclipse.core.runtime.IStatus |
supportsReorientRelationshipWithStatus(org.eclipse.uml2.uml.ActivityEdge edge,
org.eclipse.emf.ecore.EObject src,
org.eclipse.emf.ecore.EObject tgt,
boolean isSourceReorient)
Return a status code indicating the reason why a re-orienting may fail.
|
public static org.eclipse.core.runtime.IStatus supportsCreateRelationshipWithStatus(org.eclipse.emf.ecore.EObject src, org.eclipse.emf.ecore.EObject tgt, org.eclipse.emf.ecore.EClass type)
reqa
- create connector element request.sourceOnly
- Should only inspect the source as the target is not known yetpublic static boolean supportsCreateRelationship(org.eclipse.emf.ecore.EObject src, org.eclipse.emf.ecore.EObject tgt, org.eclipse.emf.ecore.EClass type)
reqa
- create connector element request.sourceOnly
- Should only inspect the source as the target is not known yetpublic static boolean isSourceAPNConstraintPassed(org.eclipse.emf.ecore.EObject src)
src
- The source ActivityParameterNodepublic static boolean isTargetAPNConstraintPassed(org.eclipse.emf.ecore.EObject tgt)
tgt
- The target ActivityParameterNodepublic static boolean isConnectable(org.eclipse.emf.ecore.EObject src, org.eclipse.emf.ecore.EObject tgt)
src
- The source elementtgt
- The target elementtrue
if the source and target can be connected
by an edge or false
if they cannot.public static boolean isCreatableAndConnectable(org.eclipse.emf.ecore.EObject src, org.eclipse.emf.ecore.EObject targetParent)
source
- The source elementparent
- The target, parent to a new element to be createdtrue
if the source and the element to be created
can be connected by an edge or false
if they cannot.public static boolean isStructuredActivityNodePinEdge(org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EObject target)
source
- the source elementtarget
- the target elementtrue
if the source is a Pin or ExpansionNode on a structured activity node connected
to a target inside the structured activity node, false
otherwisepublic static org.eclipse.core.runtime.IStatus supportsReorientRelationshipWithStatus(org.eclipse.uml2.uml.ActivityEdge edge, org.eclipse.emf.ecore.EObject src, org.eclipse.emf.ecore.EObject tgt, boolean isSourceReorient)
edge
- the edge being reorientedsrc
- the source of the edgetgt
- the target of the edgeisSourceReorient
- true
if we are reorienting the source, false
otherwiseIStatus
indicating why the relationship may not be reorientedpublic static boolean supportsReorientRelationship(org.eclipse.uml2.uml.ActivityEdge edge, org.eclipse.emf.ecore.EObject src, org.eclipse.emf.ecore.EObject tgt, boolean isSourceReorient)
edge
- the edge being reorientedsrc
- the source of the edgetgt
- the target of the edgeisSourceReorient
- true
if we are reorienting the source, false
otherwisetrue
if the edge is allowed to be reoriented, false
otherwise.public static boolean hasStereotypesSupport(java.util.List<org.eclipse.uml2.uml.Stereotype> stereotypes, org.eclipse.emf.ecore.EClass eClass)
stereotypes
- a List of stereotypeseClass
- an EClass for which to check if the stereotypes applytrue
if all the stereotypes apply to the EClass, false
otherwise.public static org.eclipse.gmf.runtime.emf.type.core.IElementType getCreateActivityEdgeRequestType(org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EObject target)
source
- the source of the edgetarget
- the target of the edgegetCompletedActivityEdgeType(...)
public static org.eclipse.gmf.runtime.emf.type.core.IElementType getReorientActivityEdgeType(org.eclipse.uml2.uml.ActivityEdge edge, org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EObject target)
source
- the source of the edge after reorienttarget
- the target of the edge after reorientpublic static org.eclipse.emf.ecore.EClass getCompletedActivityEdgeType(org.eclipse.uml2.uml.ActivityEdge edge, org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EObject target)
edge
- the edge, or null if not availablesource
- the source of the edgetarget
- the target of the edgegetCreateActivityEdgeRequestType(...)