Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Connection decorators do not get deleted
Connection decorators do not get deleted [message #802949] Mon, 20 February 2012 18:08 Go to next message
Christian B is currently offline Christian BFriend
Messages: 68
Registered: August 2011
Member
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 12:39 Go to previous message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
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: Sat Apr 20 03:08:59 GMT 2024

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

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

Back to the top