Update command handlers [message #331702] |
Wed, 17 September 2008 07:10  |
Eclipse User |
|
|
|
Hello,
I'm using org.eclipse.handlers together with <enabledWhen> syntax to keep
my commands updated.
My problem is, that when executing a command the handler service seems not
to update the toolbar and other controls that are slways shown on the
workbench.
My command implementations look like this:
public class MyCommand extends org.eclipse.core.commands.AbstractHandler{
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
// Command execution code
return null;
}
}
I've tried to call a update of the Commands manually but this had no
effect at all.
ICommandService service = (ICommandService)
PlatformUI.getWorkbench().getService(ICommandService.class);
service.refreshElements("my.procect.commands.MyCommand", null);
How can I get a update of my handlers to get correctly enabled and
disabled commands?
Thank,
Jan
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05209 seconds