Cascade deletion in EMF/GMF [message #237301] |
Thu, 23 July 2009 06:08  |
Eclipse User |
|
|
|
Hello,
I'm trying to perform multiple deletion at once from a GMF Diagram. Lets
say I have a link to an object (the link is not contained by the object),
and when I remove the object, I want to remove the link (now with dead
destination) at the same time.
I read an article about this feature
( http://dev.eclipse.org/newslists/news.eclipse.modeling.gmf/m sg04468.html)
and I don't feel comfortable with the solution.
When I was developing using GMF 1.x, I remembered I could perform such
feature by modifying the XXXEditHelper.getDestroyDependentsCommand, but it
seems this method is never called anymore with GMF 2.x...
Moreover, I discovered the IEditHelperAdvice mechanism, and I find it
really interesting.
Does someone knows how to perform such multiple deletion with
EditHelperAdvices ? Because I don't feel comfortable with multiple
deletion using the DestroyElementRequest/DestroyElementCommand.
Thanks in advance for your answer,
Maxence
|
|
|
|
|
Re: Cascade deletion in EMF/GMF [message #237527 is a reply to message #237463] |
Mon, 27 July 2009 04:04  |
Eclipse User |
|
|
|
Hello again,
It seems that I found something that makes the
XXXEditHelper.getDestroyDependentsCommand being called.
In fact, in the YYYBaseEditHelper, the getDestroyElementCommand() method
is generated as returning "null". When i make it return
"super.getDestroyElementCommand(req)", the method is called in my
EditHelper.
Is this normal, Is what I did a correct way to proceed ?
Thanks in advance,
Maxence
|
|
|
Powered by
FUDForum. Page generated in 0.29126 seconds