Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Question about create BehaviorExecutionSpecification and Message figure programatically in sequence (figure sequence diagram notation)
Question about create BehaviorExecutionSpecification and Message figure programatically in sequence [message #743179] Fri, 21 October 2011 07:44 Go to next message
Yang Liu is currently offline Yang LiuFriend
Messages: 9
Registered: June 2010
Junior Member
Hi buddy,


There is related post about how to create figure for uml object in class diagram. It's great. While I still encounter following issue in sequence diagram, can anyone help?

1. Cannot create figure for BehaviorExecutionSpecification in sequnece diagram. Neither DropObjectsRequest nor CreateViewRequest works. But user can drop BehaviorExecutionSpecification object icon from model explorer to life line to draw it.

Is there any compartmentEditPart for lifeline I should use? While CoRegion is OK using CreateViewRequest.

DropObjectsRequest dropObjectsRequest = new DropObjectsRequest();
dropObjectsRequest.setObjects(list);
dropObjectsRequest.setLocation(new Point(25 + coverLifelineX,coverLifeLineHeight/2));
Command command = coverLifelineEdipPart.getCommand(dropObjectsRequest);
diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);

IElementType type = UMLElementTypes.BehaviorExecutionSpecification_3003;
InteractionFragment fragment = (InteractionFragment) list.get(0);
ViewDescriptor viewDescriptor = new ViewDescriptor(new EObjectAdapter(
				behaviorExecutionSpecification), Node.class,
				((IHintedType) type).getSemanticHint(), true,
				coverLifelineEdipPart.getDiagramPreferencesHint());
viewDescriptor.setPersisted(true);
CreateViewRequest createViewRequest = new CreateViewRequest(viewDescriptor);
createViewRequest.setLocation(new Point(42, coverLifeLineHeight/2));
Command command = coverLifelineEdipPart.getCommand(createViewRequest);
diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);


2. When try to drag uml message object to diagram, is it possible to sepcify source and target anchor id/location?

Then all message figures will appear in the same x position (middle of lifeline).

If modify the notation model to change the location after figure created, sometime there will be pop-up dialog:

"Live Validation"
The requested action violates the integrity of the model.
Reason:
There is no valid trace sequencing the InteractionFragments in the fragement property. Some of them can not be organized as a valid sequence:
...

Looks order of fragment elements is changed after DropObjectsRequest's command execution...
Do you guys have any idea?


Thank you!

Yang
Re: Question about create BehaviorExecutionSpecification and Message figure programatically in seque [message #752225 is a reply to message #743179] Wed, 26 October 2011 10:11 Go to previous message
Yang Liu is currently offline Yang LiuFriend
Messages: 9
Registered: June 2010
Junior Member
For message notation modification, I change TransactionalEditingDomain to a new one, it looks ok now.
But still stuck in BehaviorExecutionSpecification diagram element generation, any idea?
Previous Topic:Names of the pins in instances of CallBehaviorAction
Next Topic:Sequence diagram: upward messages
Goto Forum:
  


Current Time: Fri Nov 28 07:29:03 GMT 2014

Powered by FUDForum. Page generated in 0.10869 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software