Skip to main content



      Home
Home » Modeling » Graphiti » Connection decorators do not get deleted
Connection decorators do not get deleted [message #802949] Mon, 20 February 2012 13:08 Go to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
Previous Topic:Custom "New diagram" wizard
Next Topic:Understanding container shapes and selection
Goto Forum:
  


Current Time: Thu Jul 03 07:10:42 EDT 2025

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

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

Back to the top