Removal of element children not immediately visible in editor [message #111525] |
Tue, 13 March 2007 10:16  |
Eclipse User |
|
|
|
Originally posted by: newsgroups.elmarweber.org
Hello,
I'm updating the children of an element when one of its references is
changed.
When I add a child to the EMF model element its visual representation is
immediately added. When I remove the child from the EMF model the visual
representation is not removed immediately. Only when I reopen the
diagram editor it is removed.
The code is in the corresponding ???CanonialEditPolicy#
handleNotificationEvent().
I traced the notification chain after I removed the model element to
CanonialEditPolicy#deleteViews() where ???CanonialEditPolicy#
/**
* @generated
*/
protected boolean shouldDeleteView(View view) {
return view.isSetElement() && view.getElement() != null
&& view.getElement().eIsProxy();
}
is called. The last part, view.getElement().eIsProxy(), evaluates to
false, which prevents the removal from the visual model.
When I remove view.getElement().eIsProxy() the code works as expected.
Is something in my EMF/GMF model out of order or is there a problem with
the generated code?
Best regards,
Elmar Weber
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.26980 seconds