[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.rcp] Re: How to associate global actions (copy, rename, etc.) with handler via plugin

Luzi Anderegg wrote:
If I want to use the command framework and its extension points, do I have to write a handler to use the existing standard PasteAction for resources or is there a nicer way to do that?

It depends on what you are doing and where you got the PasteAction from ... if the paste action is being supplied in a view using something like:


getViewSite().getActionBars().setGlobalActionHandler(ActionFactory.PASTE.getId(), pasteAction);

This call is also auto-generating a handler for paste for this view.

If you simply have a paste action that you were putting in a MenuManager, you can create a handler for it yourself using IHandlerService and the JFace ActionHandler.

What is it that you want to do? What parts do you currently have (like paste action, where is it created/used)?

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