"self-deletion" with EMF-Command [message #194639] |
Thu, 26 June 2008 08:11 |
Eclipse User |
|
|
|
Originally posted by: martinschmidt.83.web.de
Hi,
I have a strange GMF problem and hope somebody can help me..
In my editor I have elements of type X and elements of type group. X can lie
directly on the canvas or inside a compartment of group (aggregation). I
customized the EMF XItemProvider in the following way: When i change a
Property of X, i do some actions. The last one is to delete the current X
(dont ask why.). This is implemented in method "createSetCommand":
List<xImpl> elementsToDelete = new ArrayList<xImpl>();
elementsToDelete.add((xImpl)owner);
domain.getCommandStack().execute(new DeleteCommand(domain,
elementsToDelete));
return null;
This workes fine as long as I run the DeleteCommand of X in the place where
the X was created. That means for example: X was created on Canvas and is
still there-->DeleteCommand is working. X is created in a group and is stil
located in this group-->Command works. The deleteCommand dont work anymore,
when X was created on Canvas and moved into a group with D&D.
I debuged into it.but didn
|
|
|
Powered by
FUDForum. Page generated in 0.02541 seconds