Import a xtext file into EMF [message #1108101] |
Fri, 13 September 2013 10:43 |
Phil H Messages: 267 Registered: November 2012 |
Senior Member |
|
|
Hi,
I've the following use case and would like to have some opinions which would be the best way to realise this:
In our Project we use a combined EMF/GMF Editor, where one part of this editor is to model hardware platforms (realised in EMF).
Furthermore there is another editor (realised in xtext) which is also used to describe hardware platforms. As typical for Xtext, this instances are stored then as plain text, with a tree structure.
What we want now to achieve is to import this xtext files (plain text) into a model of our EMF/GMF editor (xmi files). So there must be some kind of transformation.
Are there any tools/frameworks supporting this, as Xtext relies on EMF? Or what do you reckon would be a clean way to realise this?
Cheers,
Phil
[Updated on: Fri, 13 September 2013 11:25] Report message to a moderator
|
|
|
|
|
Re: Import a xtext file into EMF [message #1108144 is a reply to message #1108137] |
Fri, 13 September 2013 11:58 |
|
Hi yes it is part of the framework but is meant for standalone use
only. But maybe your understanding problem is way before. .mydsl and
..xmi is the same. Is only different persistence.
Eds code shows how to initialize the framework. The rest of the
resource handling is 1:1 the same as with std. Emf.
Regarding gmf. You may search other topics to find hints on the
integration since there are specialties on gmf and Xtext so that the
interoperation is tricky
--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Import a xtext file into EMF [message #1110944 is a reply to message #1110892] |
Tue, 17 September 2013 14:36 |
|
Hi,
first: just a stupid question:
resourceset rs = new Resourcesetimpl();
rs.getResource(URI.createURI(...)); dosent work?
second:
a executableextensionfactory i a class that helps you to create classes (via plugin xml)
aware of guice.
therefor you ne a (subclass) of abstractguiceawareecectuableextensionfactory
that exposes an injector to create the class instances with help of guice.
=> you write class="x.y.z.EEF::x.z.y.YourHandler" in the plugin.xml
regarding the topic: create own or use the one from xtext
id create a own but it might with the one from the ui project as well.
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.06557 seconds