[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.gmf] Re: Link to node connection deletion

I tried with another trick :

return getGEFWrapper(CompositeCommand.compose(new NotationViewDependentsAdvice().getBeforeEditCommand(req),
new DestroyElementCommand(req)));


In that case, everything is deleted from the emf model, but the notation elements remain visible until I reload the diagram.

Guillaume

Guillaume a écrit :
Hi,
             link1
NodeA ----------------------> NodeB
              |
              |link2
              |
            NodeC

The fact is that all elements are deleted from the emf model but link1 remain visible in the diagram using the code I had to the semanticEditPolicy of the link1.
I don't know how to use the NotationViewDependentsAdvice,
I tried :


CompoundCommand cmd = new CompoundCommand();
cmd.add(getGEFWrapper(new NotationViewDependentsAdvice().getBeforeEditCommand(req)));
cmd.add(getGEFWrapper(new DestroyElementCommand(req)));
return cmd;


but the link1 is not deleted, and is not deleted in the emf model too.
Do you have an example for using this Class ?

Thanks

Guilaume

Alex Boyko a écrit :
Hi,

As far as I understood the problem is that when you select and delete link 1, you want link2 and NodeC to be deleted too, but only link1 and link2 are deleted is that correct?
One place to look at would be NotationViewDependentsAdvice.


Cheers,
Alex