Hello,
in my ViewPart I set copy/paste handlers
IHandlerService handlerService = (IHandlerService) getViewSite().getService( IHandlerService.class);
handlerService.activateHandler( ActionFactory.PASTE.getCommandId(), new PasteFavoritesHandler() );
handlerService.activateHandler( ActionFactory.COPY.getCommandId(), new CopyFavoritesHandler() );
then I create an action instance for each
paste = ActionFactory.PASTE.create( getSite().getWorkbenchWindow() );
copy = ActionFactory.COPY.create( getSite().getWorkbenchWindow() );
and later when creating the popup menu, I add these actions to the popup like this:
menuManager.add( copy );
menuManager.add( paste );
I'm able to copy and paste into the view, both using the shortcuts and the main menu, but the popup actions are always disabled. Any help appreciated.
Milos Kleint