Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 07:34 Go to next message
Timo Rohrberg is currently offline Timo RohrbergFriend
Messages: 69
Registered: September 2011
Location: Karlsruhe
Member
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 11:42 Go to previous messageGo to next message
Sumit Singh is currently offline Sumit SinghFriend
Messages: 141
Registered: October 2012
Location: Bangalore
Senior Member

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 12:14 Go to previous messageGo to next message
Timo Rohrberg is currently offline Timo RohrbergFriend
Messages: 69
Registered: September 2011
Location: Karlsruhe
Member
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 18:45 Go to previous message
Che Bumagat is currently offline Che BumagatFriend
Messages: 46
Registered: February 2012
Member
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: Tue Mar 19 09:47:39 GMT 2024

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

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

Back to the top