|[MWE] No logging and strange errors when workflow is run in a context of a plugin [message #649700]
||Thu, 20 January 2011 11:36
| Tom Brandenburg
Registered: October 2010
Location: Abstatt, Germany
My uml-2-ansic project is set up in a way that it makes contributions to the popup menu in the ResourceExplorer of the Java perspective. Said more precisely, once you right-click on a UML file you can select "Generate Code..." and C-Code is generated out of the UML file. At least it should be like that
For this I have an UI-plugin that invokes a method contained in a package of another plugin which again invokes a WorkflowRunner with the specified workflow:
NullProgressMonitor npm = new NullProgressMonitor();
WorkflowRunner wRunner = new WorkflowRunner();
wRunner.prepare(this.workflowUri.getPath(), npm, properties);
IssuesImpl issues = new IssuesImpl();
result = wRunner.executeWorkflow(slotContents, issues);
Executing this procedure works fine in a workspace context, but once I launch a eclipse application with the UI plugin, the log disappears and executeWorkflow has false as a result.
After some debugging session I found out that somehow org.apache.commons.logging.impl.NoOpLog is assigned to WorkflowRunner's logger and that executeWorkflow ends up with an exception handling, which is not shown at all in the console or somewhere else. It could only be seen in the debugger. The error comes up after
workflow.invoke(wfContext, monitor, issues);
in executeWorkflow and looks like:
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: org.eclipse.core.internal.resources.ResourceException: Resource '/temp/eclipse.uml' does not exist.
Although e.val$location is "/C:/temp/eclipse.uml".
So I have two problems: At first I have no logging at all and my paths get somehow cutted.
As I already said, in the workspace everything works fine with the same paths, but once executed as a plugin the workflow execution fails.
Do you have any idea?
Thanks in advance and best regards
Powered by FUDForum
. Page generated in 0.02745 seconds