Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Behaviour of shouldBeDeleted in generated CanonicalEditPolicies
Behaviour of shouldBeDeleted in generated CanonicalEditPolicies [message #97944] Mon, 29 January 2007 07:23 Go to next message
Eclipse UserFriend
Hi GMF-users and developers,

currently the code body of the shouldBeDeleted()-method in the generated
CanoncialEditPolicies for Compartments looks like this:

return view.isSetElement() && view.getElement() != null
&& view.getElement().eIsProxy();

Why isn't it checking if view.getElement() is still available in the
List of semantic children, i.e.

return view.isSetElement() && view.getElement() != null
&& view.getElement().eIsProxy()
|| getSemanticChildrenList().contains(view.getElement());

Can I activate this behaviour during the generation process or must I
implement it manually?

Greetings,
Alexander
Re: Behaviour of shouldBeDeleted in generated CanonicalEditPolicies [message #98047 is a reply to message #97944] Mon, 29 January 2007 08:38 Go to previous messageGo to next message
Eclipse UserFriend
Hello Alexander,

Correct implementation of this method was discussed here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=157148

-----------------
Alex Shatalin
Re: Behaviour of shouldBeDeleted in generated CanonicalEditPolicies [message #98137 is a reply to message #97944] Mon, 29 January 2007 10:17 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: vcciubot.uwaterloo.ca

When the canonical policy reacts to changes from the semantic model, it
sweeps through the children views of the current node to see which ones
should be deleted.

The check is correct because it is performed on a view whose element is
not in getSemanticChildrenList() anymore.

vlad

On Mon, 29 Jan 2007 13:23:05 +0100, Alexander Dotor wrote:

> Hi GMF-users and developers,
>
> currently the code body of the shouldBeDeleted()-method in the generated
> CanoncialEditPolicies for Compartments looks like this:
>
> return view.isSetElement() && view.getElement() != null
> && view.getElement().eIsProxy();
>
> Why isn't it checking if view.getElement() is still available in the
> List of semantic children, i.e.
>
> return view.isSetElement() && view.getElement() != null
> && view.getElement().eIsProxy()
> || getSemanticChildrenList().contains(view.getElement());
>
> Can I activate this behaviour during the generation process or must I
> implement it manually?
>
> Greetings,
> Alexander
Re: Behaviour of shouldBeDeleted in generated CanonicalEditPolicies [message #101398 is a reply to message #98137] Tue, 06 February 2007 07:03 Go to previous message
Eclipse UserFriend
>> return view.isSetElement() && view.getElement() != null
>> && view.getElement().eIsProxy()
>> || getSemanticChildrenList().contains(view.getElement());

> When the canonical policy reacts to changes from the semantic model, it
> sweeps through the children views of the current node to see which ones
> should be deleted.
>
> The check is correct because it is performed on a view whose element is
> not in getSemanticChildrenList() anymore.

I have a method in my EMF-Model which moves a semantic node from one
container to another. If I use my subvlass of AbstractEMFCommand to call
this method I end up with to notational nodes: one in the target
container as intended and one in the source container. It didn't get
deleted. If I check the EMF-Model everything is changed as intended, and
there are two notational nodes referencing on the same semantical node.

Greetings,
Alexander
Previous Topic:Setting data to the model Element
Next Topic:Resizing Parent node as Label /Child is resized/added
Goto Forum:
  


Current Time: Sat Jul 19 02:30:52 EDT 2025

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

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

Back to the top