[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.gmf] Re: 'Selecting' nodes through IAction

Hi Julia,

Thanks for your help (and detailed answer) but I don't think the functionality I have in mind will work with this approach. I need to be able to iterate through all of the nodes of a certain type from within the IAction. I don?t think the method you suggested would be as flexible as I need it as the user should be able to change the property that is being examined as well as it value and be allowed to turn on/off the functionality. Basically everything needs to be dealt with in the IAction.

The procedure would be as follows:
- right click on the canvas
- select the new popup menu item
- an SWT interface appears
- user can input their own property to be checked against a property of all the nodes
- these nodes will then have their line color changed if their property matches the user input


Everything set up except I?m unsure how to access and iterate through all the nodes.

Possibly within the IAction I could select the appropriate nodes and then use selectionChanged to iterate through all the selected node edit parts and change the line color? Might be able to do this with IStructuredSelection?

This leads me back to begin able to:
1) select all the nodes that are contained in the model (then sperate and do functs)
OR
2) select just the nodes that have a certain value in one of their properties



Thanks for your help,

Gaff