Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Removal of element children not immediately visible in editor
Removal of element children not immediately visible in editor [message #111525] Tue, 13 March 2007 10:16 Go to next message
Eclipse UserFriend
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
Re: Removal of element children not immediately visible in editor [message #111604 is a reply to message #111525] Tue, 13 March 2007 13:43 Go to previous messageGo to next message
Eclipse UserFriend
Hello Elmar,

Try search existing answers to your question in this newsgroup like: http://www.eclipse.org/search/search.cgi?q=shouldDeleteView& amp;form=extended&wf=574a74&ps=10&m=all&t=5& amp;ul=&wm=wrd&t=News&t=Mail

-----------------
Alex Shatalin
Re: Removal of element children not immediately visible in editor [message #111656 is a reply to message #111604] Tue, 13 March 2007 14:17 Go to previous message
Eclipse UserFriend
Originally posted by: newsgroups.elmarweber.org

Hello Alex,

Alex Shatalin wrote:
> Try search existing answers to your question in this newsgroup like:
>
> http://www.eclipse.org/search/search.cgi?q=shouldDeleteView& amp;form=extended&wf=574a74&ps=10&m=all&t=5& amp;ul=&wm=wrd&t=News&t=Mail

thanks for the hint, I somehow missed to search for that one.

ciao,
Elmar Weber
Previous Topic:Problems with generated navigator and properties view
Next Topic:GMF with UML Profile ?
Goto Forum:
  


Current Time: Thu Jul 03 12:14:53 EDT 2025

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

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

Back to the top