Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » HandlerUtil getSelection methods
HandlerUtil getSelection methods [message #484734] Wed, 09 September 2009 03:05 Go to next message
Paul Glezen is currently offline Paul GlezenFriend
Messages: 60
Registered: July 2009
Member
A HandlerUtil is often used to extract info from an ExcutionEvent during
command handler execution. The API docs list two methods in particular:

- getCurrentSelection
- getShowInSelection

What's the difference? The latter's description mentions a
ShowInContext selection. But I can't determine what this means.

- Paul
Re: HandlerUtil getSelection methods [message #484736 is a reply to message #484734] Wed, 09 September 2009 04:09 Go to previous messageGo to next message
Paul Glezen is currently offline Paul GlezenFriend
Messages: 60
Registered: July 2009
Member
After some more playing around, the former seems to be where the mouse
was pointing at the moment of the right-click. The later seems to be
where the cursor was.

Paul Glezen wrote:
> A HandlerUtil is often used to extract info from an ExcutionEvent during
> command handler execution. The API docs list two methods in particular:
>
> - getCurrentSelection
> - getShowInSelection
>
> What's the difference? The latter's description mentions a
> ShowInContext selection. But I can't determine what this means.
>
> - Paul
Re: HandlerUtil getSelection methods [message #484748 is a reply to message #484736] Wed, 09 September 2009 06:30 Go to previous messageGo to next message
Daniel Krügler is currently offline Daniel KrüglerFriend
Messages: 853
Registered: July 2009
Senior Member
Paul Glezen wrote:
> After some more playing around, the former seems to be where the mouse
> was pointing at the moment of the right-click. The later seems to be
> where the cursor was.

I don't think that this is the correct interpretation. "ShowInContext"
has a special meaning for parts, see

http://wiki.eclipse.org/FAQ_How_do_I_make_my_view_appear_in_ the_Show_In_menu%3F

So my assumption is, that by quereing getShowInSelection() you will only
catch current selections from parts that implement IShowInSource.

HTH & Greetings from Bremen,

Daniel Krügler
Re: HandlerUtil getSelection methods [message #484894 is a reply to message #484748] Wed, 09 September 2009 15:48 Go to previous message
Paul Glezen is currently offline Paul GlezenFriend
Messages: 60
Registered: July 2009
Member
Thanks for the link, Dan. I wasn't even aware of such a feature.

Daniel Krügler wrote:
> Paul Glezen wrote:
>> After some more playing around, the former seems to be where the mouse
>> was pointing at the moment of the right-click. The later seems to be
>> where the cursor was.
>
> I don't think that this is the correct interpretation. "ShowInContext"
> has a special meaning for parts, see
>
> http://wiki.eclipse.org/FAQ_How_do_I_make_my_view_appear_in_ the_Show_In_menu%3F
>
>
> So my assumption is, that by quereing getShowInSelection() you will only
> catch current selections from parts that implement IShowInSource.
>
> HTH & Greetings from Bremen,
>
> Daniel Krügler
Previous Topic:Problem with keybinding context
Next Topic:How To Open IWebBrowser With Internal Browser Only
Goto Forum:
  


Current Time: Thu Apr 25 15:18:48 GMT 2024

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

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

Back to the top