Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Shortcut key not appearing
Shortcut key not appearing [message #629584] Tue, 28 September 2010 19:01 Go to next message
saurav sarkar is currently offline saurav sarkarFriend
Messages: 428
Registered: July 2009
Senior Member
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 19:11]

Report message to a moderator

Re: Shortcut key not appearing [message #629592 is a reply to message #629584] Tue, 28 September 2010 19:47 Go to previous messageGo to next message
saurav sarkar is currently offline saurav sarkarFriend
Messages: 428
Registered: July 2009
Senior Member
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 13:03 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

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 17:41 Go to previous messageGo to next message
saurav sarkar is currently offline saurav sarkarFriend
Messages: 428
Registered: July 2009
Senior Member
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 05:09 Go to previous messageGo to next message
Prakash G.R. is currently offline Prakash G.R.Friend
Messages: 621
Registered: July 2009
Senior Member
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 06:08 Go to previous message
saurav sarkar is currently offline saurav sarkarFriend
Messages: 428
Registered: July 2009
Senior Member
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: Tue Jan 19 19:47:49 GMT 2021

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

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

Back to the top