Remove and add several child-elements in one command [message #484544] |
Tue, 08 September 2009 07:58 |
Peter Lang Messages: 153 Registered: July 2009 |
Senior Member |
|
|
Hi,
I've got an action, in which I would like to add/remove several child elements of of a node (displayed as border node items).
I managed to add them the way it's done in mindmap tutorial (http://wiki.eclipse.org/GMF_Tutorial_Part_3#Custom_Actions), but I guess I would have to add other commands to set attributes for these new nodes, so it would be quite a lot of code. And, I did not find any DestroyViewRequestFactory, so I don't get a destroy request for now.
I think the best solution would be, to change the underlying EObjects and then update the view. This results in a "java.lang.IllegalStateException: Cannot modify resource set without a write transaction".
I tried to somehow get this into a command and execute on stack, but I got lost somewhere between requests, eclipse-, emf- and gef-Commands, ICommands, TransactionalEditingDomain and IDiagramEditDomain ;-)
I'm sure it's quite simple when it's done, so could anyone help me with this?
Thanks a lot,
Peter
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03063 seconds