Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » cascade delete in emf/gmf
cascade delete in emf/gmf [message #157142] Thu, 25 October 2007 18:09 Go to next message
Eclipse UserFriend
Originally posted by: rez.q.com

Hi,

I have an EMF/GMF model. We can create different activity nodes (which
represents diff business activities). Each activity node in the project
explorer is master node (kind of a Type). We can drag and drop these
activity nodes (Types) from the project explorer to the editor diagram and
it creates activities of that Type. We cannot delete master node in the
project explorer as there eveything is read only. So for deleting them in
the editor we have given an option in the context menu of its type to
delete the master node activity (means right click on the type of master
in the editor diagram and say delete master activity). This context menu
option should delete the master as well as all the types in the editor.
For edit parts there is a method getDestroyDependentsCommand() in
AbstractEditHelper. But I am not able to find such thing in context menu.
Any suggestions for this.

Thanks
Re: cascade delete in emf/gmf [message #157150 is a reply to message #157142] Thu, 25 October 2007 19:01 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rez.q.com

More Info related to my problem

currently for deleting the master type we are using the extention point of
org.eclipse.ui.popupMenus (viewer contribution). In the extension point
class I am deleting the master with the help of creating the command and
giving the task to org.eclipse.emf.transaction.RecordingCommand. How
should I handle the deletion of all child types of the master type in a
transactional manner. Please help.
Re: cascade delete in emf/gmf [message #157175 is a reply to message #157150] Fri, 26 October 2007 07:50 Go to previous message
Eclipse UserFriend
Originally posted by: gmerin.integranova.com

Hi rez_q. Have you tryed to buid a GEF CompoundCommand within the method
getDestroyElementCommand of the xxxItemSemanticEditPolicy?

To add the elementos to destroy, you may use
compoundCmd.add(getMSLWrapper(new DestroyElementCommand(<element>)));

DestroyElementCommand will use the getDestroyElementCommand of the
<element> to destroy it so if the element to destroy must also destroy
other elements it's quite easy to describe the hierarchry of destruction
been quite easy to mantain it.

Hope it helps.
Gabriel.

rez q wrote:
> More Info related to my problem
>
> currently for deleting the master type we are using the extention point
> of org.eclipse.ui.popupMenus (viewer contribution). In the extension
> point class I am deleting the master with the help of creating the
> command and giving the task to
> org.eclipse.emf.transaction.RecordingCommand. How should I handle the
> deletion of all child types of the master type in a transactional
> manner. Please help.
>
>
Previous Topic:Restrictions on links
Next Topic:how to recover all information from the diagram
Goto Forum:
  


Current Time: Sat Jul 27 16:50:04 GMT 2024

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

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

Back to the top