Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Shortcut key not appearing
Shortcut key not appearing [message #629584] Tue, 28 September 2010 15:01 Go to next message
Eclipse UserFriend
Hi All,

I am witnessing a very strange thing.
I have defined my commands,handlers and keybindings.

i have two commands for which i have defined the handlers and the keybindings.i have assigned F6 and Ctrl+F5 to them.Scheme being the default scheme and the window scope.

When i test in the UI the first action is appearing fine with F6 but the second one is not appearing thought both having the same configuration and yes the command handlers are getting executed properly on both the cases.

Any pointers would be hugely appreciated.

Thanks and Regards,
Saurav

[Updated on: Tue, 28 September 2010 15:11] by Moderator

Re: Shortcut key not appearing [message #629592 is a reply to message #629584] Tue, 28 September 2010 15:47 Go to previous messageGo to next message
Eclipse UserFriend
ok....i found out something interesting...i was passing a command parameter through the second command...i just removed the command parameter and the keyboard shortcut started appearing.

Am i missing something simple ? or is there some bug in the keyboard shortcut appearances when the command parameter is specified ?
Re: Shortcut key not appearing [message #629744 is a reply to message #629592] Wed, 29 September 2010 09:03 Go to previous messageGo to next message
Eclipse UserFriend
saurav wrote:
> ok....i found out something interesting...i was passing a command
> parameter through the second command...i just removed the command
> parameter and the keyboard shortcut started appearing.

A menu command+parameter won't show a key bound to just the command
(since executing that key will do a different thing than executing the
menu item).

Think of the difference between Show View (opens a dialog) and Show
View-Console (which opens the Console view). They have different
keybindings.

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm
Re: Shortcut key not appearing [message #629842 is a reply to message #629744] Wed, 29 September 2010 13:41 Go to previous messageGo to next message
Eclipse UserFriend
Thanks Paul for the reply.
Would that mean the shortcut key wont appear on the UI for the command which has a parameter ?
Re: Shortcut key not appearing [message #629936 is a reply to message #629842] Thu, 30 September 2010 01:09 Go to previous messageGo to next message
Eclipse UserFriend
On 29/09/10 11:11 PM, saurav wrote:
> Thanks Paul for the reply.
> Would that mean the shortcut key wont appear on the UI for the command
> which has a parameter ?

No. You can define the parameter in the binding, so that if you want to
execute a command with a parameter, that would work. Something like:

<key
commandId="org.eclipse.bugs.commands.myCommand"
contextId="org.eclipse.ui.contexts.window"
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
sequence="M1+1">
<parameter
id="org.eclipse.bugs.commands.myCommandParam1"
value="someValue">
</parameter>
</key>



--
- Prakash
Platform UI Team, IBM

www.eclipse-tips.com
Re: Shortcut key not appearing [message #629949 is a reply to message #629584] Thu, 30 September 2010 02:08 Go to previous message
Eclipse UserFriend
Thanks for the reply Prakash.

I was passing the correct parameter only.but the parameter value was wrong.Now its working Smile.

Thanks again Paul and Prakash for your help.

cheers,
Saurav
Previous Topic:Seems to have no indexing
Next Topic:Repopulating a table in the dialog on checkbox selection
Goto Forum:
  


Current Time: Sat Aug 30 18:18:30 EDT 2025

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

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

Back to the top