[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.tools.gef] Re: Refreshing all connections

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.