views:

198

answers:

1

I have thus far built an Editor and a Viewer that both work on the same sort of database resource.

I'm trying to implement the sort of behaviour seen in the JDT: where selecting a files editor selects the same file in the Package Explorer.

I have ground to a halt on interaction with the TableView. Can anyone tell me how I can 1) iterate over the collection of domain-items on display in the viewer 2) then change the selection, should I find the item I need.

So in other words, a revealAndSelect(Object) method.

Your experience would be much appreciated.

M.

A: 

Ah. Silly me: the solution is of course

viewer.setSelection( new StructuredSelection( domainObjectToSelect ), true );
Martin Cowie