0

I am using the Eclipse Nebula GridTreeViewer which lets me access the selected items via a TreeSelection.

This works all good except for the sort order of the elements which are returned via StructuredSelection#iterator(). The sort order considers the order in which the elements were actually selected (e.g. when pressing Ctrl button for multi selection).

What I would need is the top=>down order of the elements as they are shown on the GUI.

I tried sorting the selection and then re-selecting with the new order. But unfortunately, the selection seems to be only updated if the actually selected elements change.

Does anyone know any other way to do this?

Developer Guy
  • 2,318
  • 6
  • 19
  • 37
user3726374
  • 583
  • 1
  • 4
  • 24
  • 1
    JFace/SWT doesn't have a `GridTreeViewer`. What is the full package name of this class? Is it Eclipse Nebula class or Eclipse RAP or ...? – greg-449 Mar 21 '18 at 10:20
  • Sorry, thats true. It is org.eclipse.nebula.jface.gridviewer.GridTreeViewer – user3726374 Mar 21 '18 at 10:29

0 Answers0