Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » object contribution action and key shortcut ...
object contribution action and key shortcut ... [message #333820] Wed, 07 January 2009 15:26 Go to next message
Carmelo  is currently offline Carmelo Friend
Messages: 224
Registered: July 2009
Senior Member
Hi all
I have got few views that displays actions in popup coming from object
contribution ...

I was wondering if it is possible to bind key to this action (for example
the delete to the delete action).

Thanks for any help
Kar
Re: object contribution action and key shortcut ... [message #333843 is a reply to message #333820] Thu, 08 January 2009 15:17 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

ObjectContributions can't be bound to keys.

On way to do this would be to create a command/handler combo that works
on the activeMenuSelection and the current selection if that's not
available. Then you can bind that command to a key and use
org.eclipse.ui.menus with a locationURI of
popup:org.eclipse.ui.popup.any to add it to popup menus, and the
menuContribution/command element can have a visibleWhen clause (to make
it similar to an object contribution)

Later,
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


Previous Topic:[p2] Eclipse 3.5 M4 - potential bug
Next Topic:Exception when doing drag-drop into a Texteditor
Goto Forum:
  


Current Time: Fri Apr 26 04:25:25 GMT 2024

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

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

Back to the top