Skip to main content


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 08:07 Go to next message
Nikita is currently offline NikitaFriend
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 19:33 Go to previous message
tsaibot54 is currently offline tsaibot54Friend
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:TreeViewer with checkboxes
Next Topic:jFace Viewer not allowing deselect using ctrl click
Goto Forum:
  


Current Time: Fri Apr 26 11:59:00 GMT 2024

Powered by FUDForum. Page generated in 0.03048 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top