|
Re: Enable/Disable "foreign" command [message #333757 is a reply to message #333756] |
Fri, 02 January 2009 18:45 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Ed Merks![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=ed.merks%40gmail.com) Messages: 33171 Registered: July 2009 |
Senior Member |
|
|
Andreas,
Maybe there are new improved ways, but in a generated EMF editor, when
the editor's action bar contributor is initialized, we do this
copyAction = new CopyAction();
copyAction.setImageDescriptor(sharedImages.getImageDescripto r(ISharedImages.IMG_TOOL_COPY));
actionBars.setGlobalActionHandler(ActionFactory.COPY.getId() ,
copyAction)
Andreas Pakulat wrote:
> Hi,
>
> I'm looking for a way to enable/disable a command that I'm not controlling
> myself (in particular the org.eclipse.ui.edit.copy one). Should this
> somehow be done in the plugin.xml of my own plugin, or do I need to get a
> hand on the command object during runtime and enable/disable it that way?
> In either case: How exactly should this look like (lets say I'd like to
> enable it only if the focussed control's selection is not empty).
>
> Andreas
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03164 seconds