removing shape with attached connection issue [message #1725454] |
Thu, 03 March 2016 15:32  |
Eclipse User |
|
|
|
Hello,
i am facing the following problem, and i think it's a Graphiti bug.
It's easy reproduce with tutorial sample.
1. Create two EClass shapes, connect them with EReference.
2. Remove one EClass shape.
you will see that EReference connection is removed with shape, but when you looked at diagram file the eobject of EReference is not removed.
not sure if its works as designed
Please advise
[Updated on: Thu, 03 March 2016 15:39] by Moderator Report message to a moderator
|
|
|
Re: removing shape with attached connection issue [message #1725886 is a reply to message #1725454] |
Tue, 08 March 2016 09:46  |
Eclipse User |
|
|
|
Maria,
hm, that happens because of the way ECore model EReferences: an EReference is a child of the EClass it starts on. That means that when you delete the target EClass, the EReference will stay; if you delete the source EClass the EReference will be deleted.
For a full blown EClass editor I would say you are right, the ERefence instance should be deleted along with the reference as well in both cases. One would trigger that in a custom implentation of the delete feature (the tutorial just uses the DefaultDeleteFeature as is). But for sake of simplicity in that tutorial I would spare that part and keep the current behavior.
Just let me know in case you have a different view at this.
Thanks for bringing this up,
Michael
|
|
|
Powered by
FUDForum. Page generated in 0.03793 seconds