Programmatic Execution of Commands is Logged as an Error [message #990560] |
Thu, 13 December 2012 02:34  |
Eclipse User |
|
|
|
Hello everybody,
I'm a little bit confused: In my RCP-based application, which is still based on the RCP 3.x platform, I am executing a declaratively defined command programmatically via the following statements:
ICommandService commandService = (ICommandService) PlatformUI.getWorkbench().getService(ICommandService.class);
ParameterizedCommand command = ParameterizedCommand.generateCommand(commandService.getCommand(commandId), parameters);
IEvaluationService evaluationService = (IEvaluationService) PlatformUI.getWorkbench().getService(IEvaluationService.class);
IEvaluationContext currentState = evaluationService.getCurrentState();
command.executeWithChecks(trigger, currentState);
When running my application on the RCP 4.2.1 platform, this still works fine, but the execution of the command is logged as an error via the platform logging mechanism. When diving into the details, I found that the MakeHandlersGo.execute(...) method logs the execution of the command via a call to WorkbenchPlugin.log(...). There, the log is made with an IStatus.ERROR. It appears to me that MakeHandlersGo.execute(...) just wanted to log an information, but by using the WorkbenchPlugin.log(...) method this turned to be logged as an error. Or am I missing something? Is the programmatic execution of commands considered a bug in the new RCP 4.2.1 platform?
Thank you for any hints.
Best regards
Timo
|
|
|
|
Re: Programmatic Execution of Commands is Logged as an Error [message #990609 is a reply to message #990600] |
Thu, 13 December 2012 07:14   |
Eclipse User |
|
|
|
Hello,
you're right, I actually forgot to put the logged output in my original post. Here it is:
13:12:07.849 [main] ERROR MPlanLogger - Calling "Command(com.initplan.mplan.client.guiobjects.openSelectedObjectListCommand,%Command.OpenSelectedObjectList,
,
Category(org.eclipse.core.commands.categories.autogenerated,Nicht kategorisiert,Automatisch generierte Befehle oder Befehle ohne Kategorie,true),
org.eclipse.ui.internal.MakeHandlersGo@6dd55e91,
,,true)" command directly
The com.initplan.mplan.client.guiobjects.openSelectedObjectListCommand is a declaratively defined command that I added myself via the MANIFEST.MF extension capability. It appears to me that the logging is just taking place for information purposes, but is accidentially logged as an error.
Thank you for any further hints.
Best regards
Timo
|
|
|
|
Powered by
FUDForum. Page generated in 0.03643 seconds