Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » "self-deletion" with EMF-Command
"self-deletion" with EMF-Command [message #194639] Thu, 26 June 2008 08:11
Eclipse UserFriend
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
Previous Topic:how to hide the connections between nodes
Next Topic:Custom initialization?
Goto Forum:
  


Current Time: Fri Apr 26 06:33:09 GMT 2024

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

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

Back to the top