|How to find out activated part upon null selection [message #664266]
||Fri, 08 April 2011 07:48
| Thomas M.
Registered: November 2010
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...
Powered by FUDForum
. Page generated in 0.02834 seconds