Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Programmatic Execution of Commands is Logged as an Error(Programmatically executing a command works but logs and error via the platform log.)
Programmatic Execution of Commands is Logged as an Error [message #990560] Thu, 13 December 2012 02:34 Go to next message
Eclipse UserFriend
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 #990600 is a reply to message #990560] Thu, 13 December 2012 06:42 Go to previous messageGo to next message
Eclipse UserFriend
What is the error you are getting can put some part of that error. I might me helpful.
Re: Programmatic Execution of Commands is Logged as an Error [message #990609 is a reply to message #990600] Thu, 13 December 2012 07:14 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: Programmatic Execution of Commands is Logged as an Error [message #1100881 is a reply to message #990609] Tue, 03 September 2013 14:45 Go to previous message
Eclipse UserFriend
Hi -

I'm running into the same issue now. Do you know what's the solution or workaround? I have an RCP running in 4.2 as well.

Hoping for your response.

Thanks!
Che
Previous Topic:Create your enterprise applications with JBizMo
Next Topic:[EMF DataBinding] - Getter called outside realm of observable
Goto Forum:
  


Current Time: Wed Mar 26 11:51:17 EDT 2025

Powered by FUDForum. Page generated in 0.03643 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top