Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » How to show keybinding for a quickmenu
How to show keybinding for a quickmenu [message #1707901] Thu, 10 September 2015 09:30 Go to next message
Peter Kullmann is currently offline Peter KullmannFriend
Messages: 240
Registered: July 2009
Senior Member
In eclipse 3.x one could add a commandId to a menu in order to display a keybinding for a related quickmenu (like for instance in the context menu of a java source file one can see an entry "Refactor" with the shortcut M1+M3+T).

Here is my example from 3.x
Quote:

<menu
commandId="ch.arenae.dnp.commands.navigateTo"
label="Goto">


The help text for the commandId parameter reads "Th commandId is used to update the submenu text with a keyboard shortcut. The command should have a handler that can launch a quickmenu version of this menu."

How can this be done in e4? I would have exepcted the commandId attribute in MMenu, but there is none.


Thanks,
Peter
Re: How to show keybinding for a quickmenu [message #1715020 is a reply to message #1707901] Wed, 18 November 2015 14:32 Go to previous messageGo to next message
Simon Laffoy is currently offline Simon LaffoyFriend
Messages: 19
Registered: January 2015
Junior Member
Hi Peter, did you ever figure this out?
Re: How to show keybinding for a quickmenu [message #1715028 is a reply to message #1715020] Wed, 18 November 2015 15:44 Go to previous messageGo to next message
Peter Kullmann is currently offline Peter KullmannFriend
Messages: 240
Registered: July 2009
Senior Member
No, still open. I filed a bug for this: https://bugs.eclipse.org/bugs/show_bug.cgi?id=482490
Re: How to show keybinding for a quickmenu [message #1724346 is a reply to message #1715028] Tue, 23 February 2016 09:49 Go to previous message
Edward Santiago is currently offline Edward SantiagoFriend
Messages: 6
Registered: February 2016
Location: USA
Junior Member


First, they have a command declaration in plugin.xml:

<command name="%ActionDefinition.refactorQuickMenu.name" description="%ActionDefinition.refactorQuickMenu.description" categoryId="org.eclipse.jdt.ui.category.refactoring" id="org.eclipse.jdt.ui.edit.text.java.refactor.quickMenu">

They declare a key binding:

<key sequence="M2+M3+T" commandId="org.eclipse.jdt.ui.edit.text.java.refactor.quickMenu" schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/>

They associate this command with a handler once editor is created. The handler itself (org.eclipse.jdt.internal.ui.actions.JDTQuickMenuCreator) takes care of filling the quick menu with items.
Previous Topic:How to customise action icons
Next Topic:How to run a Project with Existing Source Code?
Goto Forum:
  


Current Time: Thu Sep 24 00:12:12 GMT 2020

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

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

Back to the top