Connection decorators do not get deleted [message #802949] |
Mon, 20 February 2012 13:08  |
Eclipse User |
|
|
|
Hi,
I have a problem with connection decorators in Graphiti 0.8.1. They don't get removed, when its connection gets removed...
This is the code for its creation:
ConnectionDecorator textDecorator = peCreateService.createConnectionDecorator(connection, true, 0.1, false);
Text text = gaService.createDefaultText(getDiagram(), textDecorator, "false");
text.setStyle(StyleUtil.getStyleForConditionheaderText((getDiagram())));
gaService.setLocation(text, 10, 0);
I use the standard delete and remove features.
In the Tutorial the connection decorator gets removed, if removing its connection. I think this is due to the link of the connection decorators text to the business model. In my case a static string is displayed.
Any ideas?
|
|
|
Re: Connection decorators do not get deleted [message #803512 is a reply to message #802949] |
Tue, 21 February 2012 07:39  |
Eclipse User |
|
|
|
Sounds strange.
Deleting the connection decorators does not depend on any links defined from
the text to a business object. It is done in the DefaultRemoveFeature.remove
method by delegating to PeServcieImpl.deletePictogramElement which itself
delegates in its last line to the EMF helper deletion method
EcoreUtil.delete(pe, true). The last cares about deleting the pictogram
element along with all its children. Since connection decorators are stored
in a containment reference in the connection this should clean up.
Are sou sure this really gets called?
Michael
|
|
|
Powered by
FUDForum. Page generated in 0.37465 seconds