| [news.eclipse.tools.emf] Re: Limit Copy, Paste, Cut keyboard shortcuts to EMF tree only (not the entire editor) |
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());
Tom
-- B e s t S o l u t i o n . at -------------------------------------------------------------------- Tom Schindl JFace-Committer --------------------------------------------------------------------