[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.tools.emf] Re: Limit Copy, Paste, Cut keyboard shortcuts to EMF tree only (not the entire editor)

Mircea Luchian schrieb:
Hello Tom,

Thank you for the focus listener solution. I added the listeners on every text widget that accepts a copy, paste, cut command set. The EMF actions are disabled successfully while the focus is in the text widgets and enabled when the focus goes out. However, the keyboard shortcuts for the normal cut, paste, copy actions are not properly initialized. Pressing CTRL-X, CTRL-C or CTRL-V does nothing while the focus is in one of these widgets.

Would it be possible that I pass the wrong workbench window to these three actions? Here is how I initialized them below:

IAction standardCut = ActionFactory.CUT.create(editor.getEditorSite().getWorkbenchWindow());
IAction standardCopy = ActionFactory.COPY.create(editor.getEditorSite().getWorkbenchWindow());
IAction standardPaste = ActionFactory.PASTE.create(editor.getEditorSite().getWorkbenchWindow());



This might not be 100% correct, those WorkbenchWindow-Actions are special ones because they are retargetabe. Maybe it is a enough to set your own anonmyous instance.


As said those are only guesses, I've never worked with those actions myself :-(

Tom

--
B e s t S o l u t i o n . at
--------------------------------------------------------------------
Tom Schindl                                          JFace-Committer
--------------------------------------------------------------------