Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Refreshing all connections
Refreshing all connections [message #479206] Mon, 10 August 2009 09:44 Go to next message
Rok Pov is currently offline Rok PovFriend
Messages: 6
Registered: July 2009
Junior Member
Hey,

I have some logic gates that are connected together with connections.

When I change input true/false, the output stays the same as it used to be
(see the image).

How could I refresh all connections?

Thanks

http://i25.tinypic.com/n6ue1c.jpg
Re: Refreshing all connections [message #479441 is a reply to message #479206] Tue, 11 August 2009 06:25 Go to previous messageGo to next message
Rok Pov is currently offline Rok PovFriend
Messages: 6
Registered: July 2009
Junior Member
Maybe I wasn't descriptive enough.

I am searching for a way to refresh all connections (when a gate is deleted or some similar event). I am looking just for a small description of how that could be done. I've been trying to do that for 2 days and no success so far.

My application is similar to logic example, but I haven't been able to figure out a way how it is done there.

For now, I am only able to refresh source and target connection of a gate that was created/modified. I want that every time something happens, all connections (and gates) are refreshed.

Thanks,
Rok
Re: Refreshing all connections [message #479447 is a reply to message #479441] Tue, 11 August 2009 07:32 Go to previous message
Steve Jones is currently offline Steve JonesFriend
Messages: 95
Registered: July 2009
Member
Rok Pov wrote:
> Maybe I wasn't descriptive enough.
>
> I am searching for a way to refresh all connections (when a gate is
> deleted or some similar event). I am looking just for a small
> description of how that could be done. I've been trying to do that for 2
> days and no success so far.
>
> My application is similar to logic example, but I haven't been able to
> figure out a way how it is done there.
>
> For now, I am only able to refresh source and target connection of a
> gate that was created/modified. I want that every time something
> happens, all connections (and gates) are refreshed.
>
> Thanks,
> Rok

Hi Rok,

All changes in GEF should be as a result of changes in your underlying
application model which your GEF edit parts are listening to.

In your case the logic nodes, in your model, that are affected by the
initial change should look at the change and propagate that change to
any other nodes who's state will be affected. These nodes will do the
same. Your model should be able do this without any participation from
GEF code.

Each of your edit parts should be listening to it's associated model
element and should respond to any changes propagated by it.

Having said this a parent edit part can iterate over all child edit
parts if needed. Have a look at:

org.eclipse.gef.editparts.AbstractEditPart.refreshChildren()


Hope that helps.

Cheers, Steve.
Previous Topic:drag and drop and ContainerEditPolicy ?
Next Topic:Making connection with drag and drop
Goto Forum:
  


Current Time: Thu Apr 25 00:23:24 GMT 2024

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

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

Back to the top