Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » ISelectionChangedListener to find the previous selection
ISelectionChangedListener to find the previous selection [message #893987] Fri, 06 July 2012 10:47 Go to next message
Jason Lin is currently offline Jason LinFriend
Messages: 12
Registered: July 2012
Junior Member
Hello,
I add an ISelectionChangedListener in order to know the selection change.
Meanwhile, I want to know the previous selection except current selection.
How can I get it?
My stupid solution is keeping current selection each time we select. But I think it tastes bad...

Any idea? Such as other listeners I should use instead.

Thanks in advance.

Best Regards,
Jason
Re: ISelectionChangedListener to find the previous selection [message #894006 is a reply to message #893987] Fri, 06 July 2012 11:40 Go to previous messageGo to next message
Daniel Krügler is currently offline Daniel KrüglerFriend
Messages: 853
Registered: July 2009
Senior Member
On 2012-07-06 12:47, Qinhe Lin wrote:
> Hello,
> I add an ISelectionChangedListener in order to know the selection
> change. Meanwhile, I want to know the previous selection except
> current selection. How can I get it? My stupid solution is keeping
> current selection each time we select. But I think it tastes bad...
>
> Any idea? Such as other listeners I should use instead.
> Thanks in advance.

IMO your current approach is the best what you can do. There does not
exist a concept of a selection-history nor one of the "previous
selection". I also don't think that these concepts have to be part of a
general selection provider, in other words: I don't think that the lack
of these concepts is a defect.

HTH & Greetings from Bremen,

Daniel Krügler
Re: ISelectionChangedListener to find the previous selection [message #894389 is a reply to message #894006] Mon, 09 July 2012 03:28 Go to previous message
Jason Lin is currently offline Jason LinFriend
Messages: 12
Registered: July 2012
Junior Member
Yeah, it seems reasonable.

Thanks for your reply.

Best Regards,
Jason

Previous Topic:RCP-App asTest-Tool for a third-party-library ...
Next Topic:WorkbenchSourceProvider
Goto Forum:
  


Current Time: Mon Oct 07 05:09:39 GMT 2024

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

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

Back to the top