Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How to find out activated part upon null selection
How to find out activated part upon null selection [message #664266] Fri, 08 April 2011 07:48
Thomas M. is currently offline Thomas M.Friend
Messages: 4
Registered: November 2010
Junior Member
In my ISelectionListener.selectionChanged handler I want to handle unknown selections differently depending on if the newly activated part is an editor or a view.

Reason: If an unknown view is selected the display in our view should remain the same. Only if we select an unknown editor our view should become empty.

However, if we select a part which does not support selections we get null as part parameter and the event is fired as a result to partDeactivated = the active part is still the old part and not the new part. So obtaining the active part will still get me the old part at the time of selectionChanged.

How can I find out upon selectionChanged which part is going to be the new part in case the part parameter is null?

Thanks in advance

P.S. At first glance I find it "stupid" to send fireSelection(null, null) in the AbstractSelectionService. Why not pass the new part as first parameter? There must be a reason I guess...
Previous Topic:Description of handler definition in plugin.xml
Next Topic:HandlerUtil.getCurrentSelection(event) is null in detached View
Goto Forum:
  


Current Time: Thu Apr 25 09:39:48 GMT 2024

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

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

Back to the top