Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Generator POC fails on OSGi (Problem with Mwe2Runner on OSGi)
Generator POC fails on OSGi [message #697934] Mon, 18 July 2011 12:07
Markus Muenkel is currently offline Markus MuenkelFriend
Messages: 2
Registered: January 2011
Location: Walldorf, Germany
Junior Member
Hello,

we are evaluating Xtend 2 in a POC at SAP for designing a generation framework. We are targeting two deployment options: a "standalone" OSGi option that is running on the Equinox framework, and an Eclipse IDE option where the generator is installed in the IDE.

We are using Mwe2Runner to run the generation workflow (reading the EMF source model, invoking the generators, writing the output etc.). In the OSGi option we ran into the issue described in the bug reported in Eclipse bug 318721. As mentioned there by Sven Efftinge, Mwe2Runner uses overloaded run methods leading to the following issue:
When calling Mwe2Runner.run (URI, Map<String, String>, IWorkflowContext), the mwe2 module is found. This method however passes the call on to run(String, Map<String, String>, IWorkflowContext), which takes just the module name and tries to load the module again via classpath, which fails in the OSGI option. We applied the workaround described in the bug report, but clearly cannot keep this as a final solution.

We created an experimental patched bundle for org.eclipse.emf.mwe2.launch applying the following (trivial) changes: We separated the existing run method into two parts: the first part (method "run") is responsible for loading the mwe2 module, and the second (private method "runWorkflow") is running the workflow.
When we now call run (URI, Map<String, String>, IWorkflowContext), the platform URI is resolved and the workflow is executed successfully. This works for both deployment options (pure OSGi and Eclipse IDE).
Is it planned to provide a similar correction for M3?

Best regards,
Markus
Previous Topic:Creating an Action to Open the Xtext Project Wizard
Next Topic:Beginners Question - 15 minute Tutorial Extended
Goto Forum:
  


Current Time: Fri Apr 26 12:03:58 GMT 2024

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

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

Back to the top