Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » How to get to ConnectionEditPart from an EditPart
How to get to ConnectionEditPart from an EditPart [message #192266] Wed, 17 August 2005 20:16 Go to next message
Eclipse UserFriend
Originally posted by: pbeagan.yahoo_dontspamme_.com

I need to be able to toggle the visibility of a Part and its primary
connection. If an EditPart is made invisible, then its connection should
also be made invisible.

Is there a way for me to get to the ConnectionEditPart that is connected to
my EditPart? It seems that I can only get to the Connection model, which
doesn't seem to help.

Possibly I am going about this the wrong way. Is there a way to get a list
of all of the ConnectionEditParts in the editor? That way I can iterate
through and drive the visible toggle that way.

Thanks
Re: How to get to ConnectionEditPart from an EditPart [message #192276 is a reply to message #192266] Wed, 17 August 2005 20:13 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

You should be able to call getSourceConnections(). also, you can lookup the
editpart via its model using the viewer's editpart registry
"Patrick" <pbeagan@yahoo_dontspamme_.com> wrote in message
news:de05la$1gd$1@news.eclipse.org...
>I need to be able to toggle the visibility of a Part and its primary
> connection. If an EditPart is made invisible, then its connection should
> also be made invisible.
>
> Is there a way for me to get to the ConnectionEditPart that is connected
> to
> my EditPart? It seems that I can only get to the Connection model, which
> doesn't seem to help.
>
> Possibly I am going about this the wrong way. Is there a way to get a
> list
> of all of the ConnectionEditParts in the editor? That way I can iterate
> through and drive the visible toggle that way.
>
> Thanks
Re: How to get to ConnectionEditPart from an EditPart [message #192328 is a reply to message #192266] Thu, 18 August 2005 04:03 Go to previous message
Vineet Sinha is currently offline Vineet SinhaFriend
Messages: 31
Registered: July 2009
Member
Patrick wrote:
> ...
> Is there a way for me to get to the ConnectionEditPart that is connected to
> my EditPart? It seems that I can only get to the Connection model, which
> doesn't seem to help.

See how AbstractGraphicalEditPart.refreshSourceConnections() works.

Hint: you need to: getViewer().getEditPartRegistry().get(connModel)



Vineet
Previous Topic:GEF based database desinger
Next Topic:RectangleFigure does not behave as expected
Goto Forum:
  


Current Time: Thu Apr 25 01:48:46 GMT 2024

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

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

Back to the top