Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » selectionChanged listener not getting called when view is minimized
selectionChanged listener not getting called when view is minimized [message #556928] Fri, 03 September 2010 04:07 Go to next message
Nikita is currently offline Nikita
Messages: 12
Registered: July 2009
Junior Member
Hi,

I have 2 RCP Views, one containing a JFace TreeViewer (Navigator View) and
the other containting a JFace TableViewer (Metadata View). Based on the
selection made in the tree in the Navigator View, the contents of my table
in the Metadata View should get refreshed. This is done by implementing the
selectionChanged listener in the Metadata View.

Now my problem is that if I progrmatically change the selection in my tree
while the Navigator View is in the minimized state, the selectionChanged
listener of the Metadata View does not get called and its contents do not
get refreshed. This, however, works fine if my Navigator View is not
minimized.

Does anyone have a solution to this? How can I ensure that the contents of
my Metadata View get refreshed even if the selection in the tree is changed
programatically while the Navigator View is minimized?

Thanks and regards,
Nikita
Re: selectionChanged listener not getting called when view is minimized [message #711111 is a reply to message #556928] Fri, 05 August 2011 15:33 Go to previous message
tsaibot54 is currently offline tsaibot54
Messages: 1
Registered: August 2011
Junior Member
For anyone looking for the solution to this issue.

Let's say you have a ListViewer that you are using as your SelectionProvider but you aren't necessarily using your mouse to navigate and click the items. If you call listViewer.getList().select(SOME_NUMBER) then the SelectionChangedListener is not invoked. To fix this you must access the SelectionProvider by calling getSite().getSelectionProvider().setSelection(listViewer.getSelection()); within your active view.
Previous Topic:Validation Order
Next Topic:Checkboxcelleditor in treeviewercolumn
Goto Forum:
  


Current Time: Mon Jul 28 02:25:20 EDT 2014

Powered by FUDForum. Page generated in 0.04204 seconds