Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Key binding in a dialog
Key binding in a dialog [message #460345] Wed, 20 December 2006 11:25 Go to next message
Eclipse UserFriend
Originally posted by: peter_ossipov.mail.ru

Hi everybody!
I have a view and it retargets an action which has a key binding. Let us
say that when F5 is pressed in that view something happens. What happens
is that an instance of org.eclipse.jface.dialogs.PopupDialog is opened.
But when I press F5 when dialog appears the key is no processed and
retargeting action is not executed!
Is there a way to deal with this? I do not want to add a key listener to
dialog because key sequence might be changed using keyPreference page.
Anyway thanks very much for your help!
Re: Key binding in a dialog [message #460348 is a reply to message #460345] Wed, 20 December 2006 11:33 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: peter_ossipov.mail.ru

Well, partial solution is to not take focus (create popup dialog with
takeFocusOnOpen = false), but I still want to key binding work when the
dialog gets focus anyway.

Peter Osipov wrote:
> Hi everybody!
> I have a view and it retargets an action which has a key binding. Let us
> say that when F5 is pressed in that view something happens. What happens
> is that an instance of org.eclipse.jface.dialogs.PopupDialog is opened.
> But when I press F5 when dialog appears the key is no processed and
> retargeting action is not executed!
> Is there a way to deal with this? I do not want to add a key listener to
> dialog because key sequence might be changed using keyPreference page.
> Anyway thanks very much for your help!
Re: Key binding in a dialog [message #460365 is a reply to message #460348] Wed, 20 December 2006 14:44 Go to previous messageGo to next message
Eclipse UserFriend
keybindings are tied to contexts ... if you context is
org.eclipse.ui.contexts.window then that keybinding won't be active when
the dialog is up.

You would need to add a keybinding for the dialog context, or put your
keybinding in the dialogAndWindows context.


You can use the tracing options at
http://wiki.eclipse.org/index.php/Platform_Command_Framework #Tracing_Option
to see if your keybinding is accepted and if you command is handled and
enabled.

Later,
PW
Re: Key binding in a dialog [message #460674 is a reply to message #460365] Wed, 27 December 2006 04:46 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: peter_ossipov.mail.ru

Hi Paul!
Wow, to me it seems like you have just split the hair! :-) Anyway,
thanks very much for your answer!
Paul Webster wrote:
> keybindings are tied to contexts ... if you context is
> org.eclipse.ui.contexts.window then that keybinding won't be active when
> the dialog is up.
>
> You would need to add a keybinding for the dialog context, or put your
> keybinding in the dialogAndWindows context.
>
>
> You can use the tracing options at
> http://wiki.eclipse.org/index.php/Platform_Command_Framework #Tracing_Option
> to see if your keybinding is accepted and if you command is handled and
> enabled.
>
> Later,
> PW
Re: Key binding in a dialog [message #460677 is a reply to message #460365] Wed, 27 December 2006 05:23 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: peter_ossipov.mail.ru

Do I just put in contextId field of binding dialogAndWindows and that is it?
Paul Webster wrote:
> keybindings are tied to contexts ... if you context is
> org.eclipse.ui.contexts.window then that keybinding won't be active when
> the dialog is up.
>
> You would need to add a keybinding for the dialog context, or put your
> keybinding in the dialogAndWindows context.
>
>
> You can use the tracing options at
> http://wiki.eclipse.org/index.php/Platform_Command_Framework #Tracing_Option
> to see if your keybinding is accepted and if you command is handled and
> enabled.
>
> Later,
> PW
Re: Key binding in a dialog [message #460678 is a reply to message #460677] Wed, 27 December 2006 05:40 Go to previous message
Eclipse UserFriend
Originally posted by: peter_ossipov.mail.ru

A, okay. It is this one
org.eclipse.ui.contexts.dialogAndWindow
A bit tough to find this ids. :-)

Peter Osipov wrote:
> Do I just put in contextId field of binding dialogAndWindows and that is
> it?
> Paul Webster wrote:
>> keybindings are tied to contexts ... if you context is
>> org.eclipse.ui.contexts.window then that keybinding won't be active
>> when the dialog is up.
>>
>> You would need to add a keybinding for the dialog context, or put your
>> keybinding in the dialogAndWindows context.
>>
>>
>> You can use the tracing options at
>> http://wiki.eclipse.org/index.php/Platform_Command_Framework #Tracing_Option
>> to see if your keybinding is accepted and if you command is handled
>> and enabled.
>>
>> Later,
>> PW
Previous Topic:Saving/Restoring additional view informations
Next Topic:ISelectionProvider error at runtime
Goto Forum:
  


Current Time: Tue Mar 18 09:29:55 EDT 2025

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

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

Back to the top