Cascade deletion in EMF/GMF [message #237301] |
Thu, 23 July 2009 10:08 |
Maxence VANBÉSIEN Messages: 40 Registered: July 2009 Location: Lille, France |
Member |
|
|
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 #237522 is a reply to message #237463] |
Mon, 27 July 2009 07:45 |
Maxence VANBÉSIEN Messages: 40 Registered: July 2009 Location: Lille, France |
Member |
|
|
Hello,
At first, thanks for your answer ;)
In fact, I think the problem comes from deeper...
My XXXEditHelper is successfully "used", but only one method is called and
it is always the same: the getDestroyElementCommand() method.
When I try to debug a little bit, I can see that the GMF engine always
create a DestroyElementRequest. (The request is created in the
org.eclipse.gmf.runtime.diagram.ui.actions.AbstractDeleteFro mAction.createTargetRequest()))
By the way, the command used seems to always be the DestroyElementCommand.
I don't know currently where to look, the determine where the
DestroyDependentsRequest is supposed to be created so the
getDestroyDependentsCommand() method should be called. Could you give me
advice ?
Thanks in advance,
Maxence
|
|
|
|
Powered by
FUDForum. Page generated in 0.04021 seconds