Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Attach source code to plug-in: Modeling Workflow Engine 2 Launch(How to attach source code for plug-ins)
Attach source code to plug-in: Modeling Workflow Engine 2 Launch [message #1765600] Mon, 12 June 2017 17:13 Go to next message
Jim Wang is currently offline Jim WangFriend
Messages: 4
Registered: May 2017
Junior Member
Hello,

Disclaimer: I am totally new to Eclipse, OSGi, EMF and xtext so please forgive my naive question and read past my inappropriate terminology.

TL;DR: How do I find and attach source code to a plug-in dependency in eclipse? Namely: org.eclipse.emf.mwe2.launch_2.9.0.v201605261103.jar.

We have started on an xtext project where we have defined a grammar, scoping, formatting and code generation - following guides all the way. However the time has come for us to dive deeper into the guts of xtext to see how it all 'hangs-together' and I wanted to start by examining how the mwe2 workflow is run.

With my default Eclipse Modelling Tools installation, I have a plug-in dependency: org.eclipse.emf.mwe2.launch_2.9.0.v201605261103.jar. Inside this lives Mwe2Runner.java. However I cannot find how to attach the source code to this jar. I can't quite see how the installed software components map to my plug-in dependencies i.e. given the above jar, which update site do I need to use and which software component (i.e. name) do I need?

As I'm new to the ecosystem, I'm not sure if this is a question of understanding xtext, eclipse or OSGi more generally so any guidance is appreciated.

Many thanks in advance.

Jim
Re: Attach source code to plug-in: Modeling Workflow Engine 2 Launch [message #1765656 is a reply to message #1765600] Tue, 13 June 2017 08:01 Go to previous messageGo to next message
Karsten Thoms is currently offline Karsten ThomsFriend
Messages: 762
Registered: July 2009
Location: Dortmund, Germany
Senior Member

When developing plugins you will have to set a target platform in Eclipse. This target platform has to include source bundles, which is usually bundled with SDK features.

If you have created a target definition with the Xtext wizard, add org.eclipse.emf.mwe2.launch.source.

<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.emf.mwe2.launcher.feature.group" version="0.0.0"/>
<unit id="org.eclipse.emf.mwe2.launch.source" version="0.0.0"/>
<repository location="http://download.eclipse.org/modeling/emft/mwe/updates/releases/2.9.0/"/>
</location>
Re: Attach source code to plug-in: Modeling Workflow Engine 2 Launch [message #1765685 is a reply to message #1765656] Tue, 13 June 2017 11:15 Go to previous messageGo to next message
Jim Wang is currently offline Jim WangFriend
Messages: 4
Registered: May 2017
Junior Member
Thanks for the suggestion. I tried following, but no luck, here is what I did:

1. I started an xtext project from scratch to experiment with the target definition.
2. I created a target-definition.target file (location per screenshot 1).
3. I then edited the file adding your suggestion, however the 'Locations' section of the Target Editor is complaining (per screenshot 1).
4. I proceeded anyway and hit 'Set as Target Platform', but still no source files i.e. org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner is still missing source files.
5. I updated <unit version> to 2.9.0 and there are now fewer exceptions (screenshot 2) but still no source files after I hit 'Set as Target Platform'

Any ideas?



Screenshot 1
index.php/fa/29624/0/

Screenshot 2
index.php/fa/29625/0/


[Updated on: Tue, 13 June 2017 11:20]

Report message to a moderator

Re: Attach source code to plug-in: Modeling Workflow Engine 2 Launch [message #1765686 is a reply to message #1765685] Tue, 13 June 2017 11:30 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
what does mwe core require?

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Priority/Order of contentassist proposals (in particular templates)
Next Topic:Integrating Xtext generated language server with Generic Editor
Goto Forum:
  


Current Time: Tue Apr 23 15:51:39 GMT 2024

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

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

Back to the top