Skip to main content



      Home
Home » Eclipse Projects » GEF » Node and Connection creation inconsistency?
Node and Connection creation inconsistency? [message #248677] Sun, 26 April 2009 14:41 Go to next message
Eclipse UserFriend
Originally posted by: vineet.architexa.com

Hi,
In our GEF Editor's model we have a node with a connection from it which
moves somewhere else in the children hierarchy. This results in the
destination model's edit parts AbstractEditPart.refreshChildren to be
triggered and for a new child edit part to be created. However, as the
*new* edit part's AbstractGraphicalEditPart.refreshSourceConnections is
called, the *old* connection if found and used.

Should this be happening? Am I missing something? Is it just that the
policy for creating edit parts is different for connections than for nodes?

We can build around it, but would rather understand what (/why) things
should be happening?

Thanks!

Regards,
Vineet
Re: Node and Connection creation inconsistency? [message #248748 is a reply to message #248677] Wed, 29 April 2009 12:41 Go to previous message
Eclipse UserFriend
The viewer maintains a registry of all edit parts including connections.
It looks in the registry first when creating a new connection edit part.
It's keyed by model object, so if your connection model object is the
same when its moved, you'll get the same edit part.

Check out

AbstractGraphicalEditPart#createOrFindConnection(Object model)
AbstractGraphicalEditPart#refreshSourceConnections()

Regards,
Ben


Vineet Sinha wrote:
> Hi,
> In our GEF Editor's model we have a node with a connection from it which
> moves somewhere else in the children hierarchy. This results in the
> destination model's edit parts AbstractEditPart.refreshChildren to be
> triggered and for a new child edit part to be created. However, as the
> *new* edit part's AbstractGraphicalEditPart.refreshSourceConnections is
> called, the *old* connection if found and used.
>
> Should this be happening? Am I missing something? Is it just that the
> policy for creating edit parts is different for connections than for nodes?
>
> We can build around it, but would rather understand what (/why) things
> should be happening?
>
> Thanks!
>
> Regards,
> Vineet
Previous Topic:Repopulate RootEditPart on double-click
Next Topic:negative coordinates
Goto Forum:
  


Current Time: Mon Apr 14 17:12:56 EDT 2025

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

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

Back to the top