|
|
|
|
|
|
Re: Change the default anchor on a connection [message #1264464 is a reply to message #1263571] |
Wed, 05 March 2014 08:41 |
Fayçal Benaziz Messages: 7 Registered: December 2013 |
Junior Member |
|
|
Here is my code below :
public void attachedToSource(ICreateConnectionContext contex) {
PictogramElement pe = context.getSourcePictogramElement();
ILocation loc = context.getSourceLocation();
// I retrieve the diagram's editing domain
TransactionalEditingDomain editingDomain = getDiagramBehavior().getEditingDomain();
// I create my command which will create the anchor dynamically in the source pictogram element
AddCommandAnchorMessage cmd = new AddCommandAnchorMessage(editingDomain, pe, loc);
// I execute this command
editingDomain.getCommandStack().execute(cmd);
// I change the source anchor in the context
((CreateConnectionContext)context).setSourceAnchor(cmd.getAnchorCreated);
}
I can attest that the anchor is well-created but not used in the visualization.
[Updated on: Wed, 05 March 2014 08:42] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.04090 seconds