Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Key binding sequence in label
Key binding sequence in label [message #335802] Thu, 30 April 2009 15:52 Go to next message
Aleksandr Kravets is currently offline Aleksandr KravetsFriend
Messages: 5
Registered: July 2009
Junior Member
Hello,

When I define a key binding via org.eclipse.ui.bindings extension point,
the shortcut sequence does not show up in the label of the menu item. How
can I add the sequence to the label? I am pretty sure sequence appears
there not because of direct manipulation of the label.

thanks,
Alex
Re: Key binding sequence in label [message #335803 is a reply to message #335802] Thu, 30 April 2009 17:06 Go to previous messageGo to next message
Prakash G.R. is currently offline Prakash G.R.Friend
Messages: 621
Registered: July 2009
Senior Member
Aleksandr Kravets wrote:
> Hello,
>
> When I define a key binding via org.eclipse.ui.bindings extension point,
> the shortcut sequence does not show up in the label of the menu item.
> How can I add the sequence to the label? I am pretty sure sequence
> appears there not because of direct manipulation of the label.
>
> thanks,
> Alex
>

Is there a conflict for your keybinding?

- Prakash

---
http://blog.eclipse-tips.com
Re: Key binding sequence in label [message #335804 is a reply to message #335803] Thu, 30 April 2009 17:14 Go to previous messageGo to next message
Aleksandr Kravets is currently offline Aleksandr KravetsFriend
Messages: 5
Registered: July 2009
Junior Member
I don't think so, the binding is M1+I D. How would I know if there is a
conflict?
I also tried M1+Z D and same result.
Re: Key binding sequence in label [message #335806 is a reply to message #335802] Thu, 30 April 2009 17:32 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Aleksandr Kravets wrote:
> Hello,
>
> When I define a key binding via org.eclipse.ui.bindings extension point,
> the shortcut sequence does not show up in the label of the menu item.

How are you defining your menu item? If using org.eclipse.ui.menus, it
should show up for free. If you are using org.eclipse.ui.actionSets you
would need to set the definitionId. If you are creating IActions
programmatically, you would use setActionDefinitionId(*) (but then how
are you tying this to the command?)

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/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/guide/workbench.htm


Re: Key binding sequence in label [message #335807 is a reply to message #335806] Thu, 30 April 2009 17:43 Go to previous messageGo to next message
Aleksandr Kravets is currently offline Aleksandr KravetsFriend
Messages: 5
Registered: July 2009
Junior Member
Like this: http://pastebin.com/m1520cff
Re: Key binding sequence in label [message #335808 is a reply to message #335807] Thu, 30 April 2009 17:49 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Aleksandr Kravets wrote:
> Like this: http://pastebin.com/m1520cff

Those are the requisite command and binding definitions ...

How are you defining the menu item? That's what determines how the
command could show up.

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/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/guide/workbench.htm


Re: Key binding sequence in label [message #335809 is a reply to message #335808] Thu, 30 April 2009 17:58 Go to previous messageGo to next message
Aleksandr Kravets is currently offline Aleksandr KravetsFriend
Messages: 5
Registered: July 2009
Junior Member
Right, here it is: http://pastebin.com/m738e9f0
Re: Key binding sequence in label [message #335810 is a reply to message #335809] Thu, 30 April 2009 18:09 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Aleksandr Kravets wrote:
> Right, here it is: http://pastebin.com/m738e9f0
>

Ah, OK. objectContributions don't support keybindings, as they are only
active as long as the context menu is open.

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/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/guide/workbench.htm


Re: Key binding sequence in label [message #335811 is a reply to message #335810] Thu, 30 April 2009 18:35 Go to previous message
Aleksandr Kravets is currently offline Aleksandr KravetsFriend
Messages: 5
Registered: July 2009
Junior Member
I see. Thanks Paul.
Previous Topic:Export plugin
Next Topic:[CNF] Enablement with resources
Goto Forum:
  


Current Time: Tue Mar 19 06:16:11 GMT 2024

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

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

Back to the top