[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 wrote:

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());

As Tom mentioned, the ActionFactory actions are retargetable (and not even that in 3.4). They don't do anything, they just delegate execution to something else.


If you need to have "copy" work as *either* normal copy in the current text control *or* run your copy action to deal with something in the part (a graphical object, for example) you can use org.eclipse.ui.actions.TextActionHandler

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/help33/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/workbench.htm