|
UML | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.topcased.modeler.uml.sequencediagram.SequenceUtils
public final class SequenceUtils
Utility class to manipulate UML EObjects for the sequence diagram.
Field Summary | |
---|---|
static int |
ALIGNEMENT_MESSAGE_STEP
The step where the message becomes rectilinear |
Method Summary | |
---|---|
static int |
alignPosAnchor(org.eclipse.draw2d.geometry.Point pos,
org.eclipse.draw2d.geometry.Point oppositepos)
Align a position of an anchor to the opposite anchor if they are on "approximatively" on the same ordinate |
static GraphConnector |
createGraphConnector(org.eclipse.draw2d.geometry.Point p,
GraphElement element,
GraphEdge graphEdge)
Create a new graph connector |
static GraphConnector |
getGraphConnector(org.eclipse.uml2.uml.MessageOccurrenceSpecification occurrenceSpecification,
GraphNode edgeContainer)
Return the connector corresponding to the occurrenceSpecification |
static java.util.Collection |
getMessageArguments(org.eclipse.uml2.uml.Message message)
Get the collection of arguments of the signature of a message. |
static org.eclipse.uml2.uml.MessageEvent |
getMessageEvent(org.eclipse.uml2.uml.Message msg)
Get the MessageEvent associated with a Message. |
static java.lang.String |
getMessageNotation(org.eclipse.uml2.uml.Message message)
Get the notation of the message |
static org.eclipse.uml2.uml.MessageOccurrenceSpecification |
getMessageOccurrenceSpecification(GraphConnector connector)
Return the occurrenceSpecification corresponding to the connector |
static org.eclipse.draw2d.geometry.Point |
getOccurrenceSpecificationPosition(org.eclipse.draw2d.IFigure figure,
GraphNode edgeContainer,
org.eclipse.uml2.uml.MessageOccurrenceSpecification occurrenceSpecification)
Get the occurrenceSpecification position on the lifeline |
static java.lang.String |
getOperationCallText(org.eclipse.uml2.uml.Operation operation)
Get the text representing the typical call of an the operation This function will return a string with the operation name and a sequence of '-' for each parameter. |
static org.eclipse.draw2d.geometry.Point |
getSourceAbsolutePosition(MessageEditPart msgEdit)
Return the absolute position of the source of the message |
static org.eclipse.draw2d.geometry.Point |
getSourcePosition(MessageEditPart msgEdit)
Return the relative position of the source of the message |
static java.lang.String |
getStringValue(org.eclipse.uml2.uml.ValueSpecification valueSpec)
Return the string representation of the ValueSpecification |
static org.eclipse.draw2d.geometry.Point |
getTargetAbsolutePosition(MessageEditPart msgEdit)
Return the absolute position of the target of the message |
static org.eclipse.draw2d.geometry.Point |
getTargetPosition(MessageEditPart msgEdit)
Return the relative position of the target of the message |
static void |
insertOccurrenceSpecification(GraphEdge edge,
org.eclipse.draw2d.IFigure figure,
org.eclipse.uml2.uml.MessageOccurrenceSpecification newOccurrenceSpecification,
org.eclipse.uml2.uml.Lifeline lifeline,
org.eclipse.draw2d.geometry.Point newPos)
Insert an OccurrenceSpecification to the lifeline at the correct postition If there is another occurrenceSpecification corresponding a message which is not drawn on the diagram, the new occurrenceSpecification is inserted before it. |
static boolean |
isCall(org.eclipse.uml2.uml.Message message)
Return true if the message is a Call Message |
static boolean |
isCreateMessage(org.eclipse.uml2.uml.Message message)
Return true if the message is a Create Message |
static boolean |
isDeleteMessage(org.eclipse.uml2.uml.Message message)
Return true if the message is a Delete Message |
static boolean |
isReplyMessage(org.eclipse.uml2.uml.Message message)
Return true if the message is a reply message |
static boolean |
isSignal(org.eclipse.uml2.uml.Message message)
Return true if the message is a Signal Message |
static boolean |
isSynchCallMessage(org.eclipse.uml2.uml.Message message)
Return true if the message is a SynchronousCall Message |
static void |
removeGraphConnector(GraphConnector connector,
GraphElement element,
GraphEdge graphedge)
Remove a graph connector from the model |
static void |
setMessageEventSignature(org.eclipse.uml2.uml.MessageEvent messEvent,
org.eclipse.uml2.uml.NamedElement signature)
This method is used to set the signature of a MessageEvent |
static void |
updateArguments(java.util.Collection newArguments,
java.util.Collection oldArguments)
Deprecated. The update of the Arguments should be done step by step |
static void |
updateOccurrenceSpecification(GraphEdge edge,
org.eclipse.uml2.uml.MessageOccurrenceSpecification changedOccurrenceSpecification,
org.eclipse.draw2d.geometry.Point newPos,
BaseEditPart oldNodeEdit,
BaseEditPart newNodeEdit)
Update an occurrenceSpecification |
static void |
updateStartAndFinishOccurrenceSpecification(BehaviorExecutionSpecificationEditPart execEdit)
Set the start and finish OccurrenceSpecification of an ExecutionOccurrence. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ALIGNEMENT_MESSAGE_STEP
Method Detail |
---|
public static void insertOccurrenceSpecification(GraphEdge edge, org.eclipse.draw2d.IFigure figure, org.eclipse.uml2.uml.MessageOccurrenceSpecification newOccurrenceSpecification, org.eclipse.uml2.uml.Lifeline lifeline, org.eclipse.draw2d.geometry.Point newPos)
edge
- the edge of the new occurrenceSpecificationfigure
- the figure of the edge (or node for lost or found)newOccurrenceSpecification
- the new OccurrenceSpecification to
insertlifeline
- the lifelinenewPos
- the position of the occurrenceSpecification on the lifelinepublic static org.eclipse.draw2d.geometry.Point getOccurrenceSpecificationPosition(org.eclipse.draw2d.IFigure figure, GraphNode edgeContainer, org.eclipse.uml2.uml.MessageOccurrenceSpecification occurrenceSpecification)
figure
- the figure owning the anchor of the occurrenceSpecificationedgeContainer
- the graph node that contains every edgeoccurrenceSpecification
- the occurrenceSpecification
public static org.eclipse.draw2d.geometry.Point getSourcePosition(MessageEditPart msgEdit)
msgEdit
- the edit part of the message
public static org.eclipse.draw2d.geometry.Point getTargetPosition(MessageEditPart msgEdit)
msgEdit
- the edit part of the message
public static org.eclipse.draw2d.geometry.Point getSourceAbsolutePosition(MessageEditPart msgEdit)
msgEdit
- the edit part of the message
public static org.eclipse.draw2d.geometry.Point getTargetAbsolutePosition(MessageEditPart msgEdit)
msgEdit
- the edit part of the message
public static int alignPosAnchor(org.eclipse.draw2d.geometry.Point pos, org.eclipse.draw2d.geometry.Point oppositepos)
oppositepos
- absolute position of the opposite anchorpos
- position of the anchor the align
public static void updateStartAndFinishOccurrenceSpecification(BehaviorExecutionSpecificationEditPart execEdit)
execEdit
- the edit part of the ExecutionSpecificationpublic static GraphConnector getGraphConnector(org.eclipse.uml2.uml.MessageOccurrenceSpecification occurrenceSpecification, GraphNode edgeContainer)
occurrenceSpecification
- the occurrenceSpecificationedgeContainer
- the container of the edge (the diagram node)
public static org.eclipse.uml2.uml.MessageOccurrenceSpecification getMessageOccurrenceSpecification(GraphConnector connector)
connector
- the connector
public static GraphConnector createGraphConnector(org.eclipse.draw2d.geometry.Point p, GraphElement element, GraphEdge graphEdge)
p
- the position of the connectorelement
- the receiving graph elementgraphEdge
- the owning graph edge
public static void removeGraphConnector(GraphConnector connector, GraphElement element, GraphEdge graphedge)
connector
- the connector to removeelement
- the element wich receive the connectorgraphedge
- the owning graph edgepublic static void updateOccurrenceSpecification(GraphEdge edge, org.eclipse.uml2.uml.MessageOccurrenceSpecification changedOccurrenceSpecification, org.eclipse.draw2d.geometry.Point newPos, BaseEditPart oldNodeEdit, BaseEditPart newNodeEdit)
edge
- the egde of the occurrenceSpecificationchangedOccurrenceSpecification
- the changed occurrenceSpecificationnewPos
- the new position of the occurrenceSpecificationoldNodeEdit
- the old receiving nodenewNodeEdit
- the new receiving nodepublic static java.lang.String getOperationCallText(org.eclipse.uml2.uml.Operation operation)
operation
- the operation
public static boolean isSignal(org.eclipse.uml2.uml.Message message)
message
- the message to check
public static boolean isCall(org.eclipse.uml2.uml.Message message)
message
- the message to check
public static boolean isSynchCallMessage(org.eclipse.uml2.uml.Message message)
message
- the message to check
public static boolean isReplyMessage(org.eclipse.uml2.uml.Message message)
message
- the Message to check
public static boolean isCreateMessage(org.eclipse.uml2.uml.Message message)
message
- the Message to check
public static boolean isDeleteMessage(org.eclipse.uml2.uml.Message message)
message
- the Message to check
public static java.util.Collection getMessageArguments(org.eclipse.uml2.uml.Message message)
message
- the Message
public static void updateArguments(java.util.Collection newArguments, java.util.Collection oldArguments)
newArguments
- the new collection of MessageArgumentoldArguments
- the old collection of MessageArgumentpublic static void setMessageEventSignature(org.eclipse.uml2.uml.MessageEvent messEvent, org.eclipse.uml2.uml.NamedElement signature)
messEvent
- the MessageEventsignature
- the newSignature. This may be a null Signature.public static org.eclipse.uml2.uml.MessageEvent getMessageEvent(org.eclipse.uml2.uml.Message msg)
msg
- the Message
public static java.lang.String getMessageNotation(org.eclipse.uml2.uml.Message message)
message
- the message
public static java.lang.String getStringValue(org.eclipse.uml2.uml.ValueSpecification valueSpec)
valueSpec
- the ValueSpecification
|
UML | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (c) 2005 TOPCASED Contributors 2005 - 2007. All rights reserved.