Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Need Key-Shortcuts at caontext menu  () 1 Vote
Need Key-Shortcuts at caontext menu [message #826661] Thu, 22 March 2012 10:59 Go to next message
Markus Jo is currently offline Markus JoFriend
Messages: 83
Registered: January 2012
Member
Hi everybody,
I already started a similar topic without success, so I try it again with new information.

My problem is that my customer wants keyboard shortcuts for the context menu in the generated EMF editor.

The answers in my last thread told me that this would be done automatically....but it wasn´t. There are only shortcuts for REDO and UNDO, but not for Cut COPY and Paste.

Just like at this picture.....you can google....on all screenshots found there is not CTRL C / V / X bound.


http://www.eclipse.org/articles/Article-EMF-goes-RCP/images/library_app_editor.gif

Does nobody know how you man bind these three actions to such a shortcut ? I become desperate.
Re: Need Key-Shortcuts at caontext menu [message #826698 is a reply to message #826661] Thu, 22 March 2012 11:53 Go to previous message
Markus Jo is currently offline Markus JoFriend
Messages: 83
Registered: January 2012
Member
Ok, after hacking EMF, Eclipse and Windows 7 I found a way.....

For each action in your menu, define a command with an id and define a binding to the shortcut you want in your plugin.xml. Then, when you create the action in your ActionBarAdvisor, don't set the accelerator. Set the IAction.setActionDefinitionId(*) to the command id and call register(action);

Now you have the Shortcut displayed in the context menu and it is also bound to the key comb......in my case I had to enter "M1+V" as key sequence to work as "CTRL+V"...dont know why.

If there is a better way or somebody knows that this causes problems...I `ll to this thread for a few days.
Previous Topic:ClassCastException on XMI import/export
Next Topic:reusing EditingDomainActionBarContributor for a View
Goto Forum:
  


Current Time: Thu Apr 25 16:34:03 GMT 2024

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

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

Back to the top