Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How to enable CTRL+C KeyBinding for custom handler
How to enable CTRL+C KeyBinding for custom handler [message #1400745] Mon, 14 July 2014 16:59 Go to next message
Thorsten Schlathölter is currently offline Thorsten Schlathölter
Messages: 208
Registered: February 2012
Location: Düsseldorf
Senior Member
Hi,
I need some help with the activation of commands using key-bindings.
I have added a popupmenu for Copy/Paste in my RCP application using org.eclipse.ui.menu. I have set the commands org.eclipse.ui.edit.copy and org.eclipse.ui.edit.paste respectively. In addition I have added a handler for the commands that activates the handlers when a specific activeMenuSelection is found. Now the commands work just fine from the context menu itself but it is not possible to trigger them with the keyboard binding CTRL+C, CTRL+V. Tracing shows that the default WidgetMethodHandler is active at the time the CTRL+C is pressed.

Can someone tell me what I am missing here?

Thanks in advance
Thorsten
Re: How to enable CTRL+C KeyBinding for custom handler [message #1401448 is a reply to message #1400745] Tue, 15 July 2014 16:28 Go to previous message
Brian de Alwis is currently offline Brian de Alwis
Messages: 189
Registered: January 2012
Senior Member

activeMenuSelection is only set while the context menu is shown. You need to add separate handlers for o.e.ui.edit.copy and .paste for your particular situations (e.g., for a particular activePart)

Brian.


Eclipse Platform committer. Ask me about Eclipse support, training, and consulting.
Previous Topic:Eclipse navigator extensions
Next Topic:e3: Using a view in 2 different perspectives...not sharing data
Goto Forum:
  


Current Time: Sun Sep 21 06:22:54 GMT 2014

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

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