Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Mixing Other Frameworks
Mixing Other Frameworks [message #517252] Fri, 26 February 2010 17:00 Go to next message
Horacio Hoyos is currently offline Horacio HoyosFriend
Messages: 242
Registered: October 2009
Location: Mexico
Senior Member

Hello,

I constructed a DSL using xtext. I have a number of text files written in that DSL and I want to transform them into a single model that conforms to another metamodel. AFAIK xtend dosn't support model merging (each text file is considered a model corresponding to the my dsl metamodel) to merge all the files to one or multiple input model to one output model to do the merge on the transformation.

So I think epsilon can help me, but since my models are not ecore based I need the xtext reader class to read the models (org.eclipse.xtext.MweReader). But since epsilon doesn't use a workflow I am wondering if some one can think of a way to read my dsl files (models) so I can use them as inputs for Epsilon.

Regards,

Horacio Hoyos


Horacio Hoyos Rodriguez
Kinori Tech
Need professional support for Epsilon, EMF?
Go to: https://kinori.tech
Re: Mixing Other Frameworks [message #517281 is a reply to message #517252] Fri, 26 February 2010 19:04 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Horacio,

Xtext files are proper EMF resources and as such they can be used as-are
in Epsilon. In your EMF model configuration dialog, or the
epsilon.emf.loadModel ANT task, just specify the model you need to work
with (your DSL file) and your metamodel (as usual) and it should work
fine. Please let me know if you face any problems with this.

Cheers,
Dimitris

Horacio wrote:
> Hello,
>
> I constructed a DSL using xtext. I have a number of text files written
> in that DSL and I want to transform them into a single model that
> conforms to another metamodel. AFAIK xtend dosn't support model merging
> (each text file is considered a model corresponding to the my dsl
> metamodel) to merge all the files to one or multiple input model to one
> output model to do the merge on the transformation.
>
> So I think epsilon can help me, but since my models are not ecore based
> I need the xtext reader class to read the models
> (org.eclipse.xtext.MweReader). But since epsilon doesn't use a workflow
> I am wondering if some one can think of a way to read my dsl files
> (models) so I can use them as inputs for Epsilon.
>
> Regards,
>
> Horacio Hoyos
Re: Mixing Other Frameworks [message #520246 is a reply to message #517281] Thu, 11 March 2010 16:50 Go to previous messageGo to next message
Horacio Hoyos is currently offline Horacio HoyosFriend
Messages: 242
Registered: October 2009
Location: Mexico
Senior Member

Dimitris,

My DSL files are not EMf resources, they are just plain text files. The generator project created as part of a xtext project is used to read your dsl files and transform them to text. In the generated workflow the dsl file (model) is read with:
<component class="org.eclipse.xtext.MweReader" uri="${modelFile}">
        <!-- this class will be generated by the xtext generator -->
	<register class="org.xtext.example.DieselStandaloneSetup"/>
</component>


So it seems that that java class is needed to "interpret" my dsl files and load them to a interpretable xmi instance to use in the transformations.

My guess is that I have to make an ant file to run my transformations (and not a configuration) and include the above component to access my dsl files as models?

Regards,

Horacio





Horacio Hoyos Rodriguez
Kinori Tech
Need professional support for Epsilon, EMF?
Go to: https://kinori.tech
Re: Mixing Other Frameworks [message #520408 is a reply to message #520246] Fri, 12 March 2010 09:38 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Horacio,

I must admit I'm not very familiar with MWE and only have limited
experience with Xtext. I'll have a look at this and try to put together
an example that shows how to use textual Xtext-based DSL models in
Epsilon within the next few days.

Cheers,
Dimitris

Horacio wrote:
> Dimitris,
>
> My DSL files are not EMf resources, they are just plain text files. The
> generator project created as part of a xtext project is used to read
> your dsl files and transform them to text. In the generated workflow the
> dsl file (model) is read with:
>
> <component class="org.eclipse.xtext.MweReader" uri="${modelFile}">
> <!-- this class will be generated by the xtext generator -->
> <register class="org.xtext.example.DieselStandaloneSetup"/>
> </component>
>
>
> So it seems that that java class is needed to "interpret" my dsl files
> and load them to a interpretable xmi instance to use in the
> transformations.
>
> My guess is that I have to make an ant file to run my transformations
> (and not a configuration) and include the above component to access my
> dsl files as models?
>
> Regards,
>
> Horacio
>
>
>
>


--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
Re: Mixing Other Frameworks [message #587368 is a reply to message #517281] Thu, 11 March 2010 16:50 Go to previous message
Horacio Hoyos is currently offline Horacio HoyosFriend
Messages: 242
Registered: October 2009
Location: Mexico
Senior Member

Dimitris,

My DSL files are not EMf resources, they are just plain text files. The generator project created as part of a xtext project is used to read your dsl files and transform them to text. In the generated workflow the dsl file (model) is read with:

<component class="org.eclipse.xtext.MweReader" uri="${modelFile}">
<!-- this class will be generated by the xtext generator -->
<register class="org.xtext.example.DieselStandaloneSetup"/>
</component>


So it seems that that java class is needed to "interpret" my dsl files and load them to a interpretable xmi instance to use in the transformations.

My guess is that I have to make an ant file to run my transformations (and not a configuration) and include the above component to access my dsl files as models?

Regards,

Horacio


Horacio Hoyos Rodriguez
Kinori Tech
Need professional support for Epsilon, EMF?
Go to: https://kinori.tech
Re: Mixing Other Frameworks [message #587380 is a reply to message #587368] Fri, 12 March 2010 09:38 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Horacio,

I must admit I'm not very familiar with MWE and only have limited
experience with Xtext. I'll have a look at this and try to put together
an example that shows how to use textual Xtext-based DSL models in
Epsilon within the next few days.

Cheers,
Dimitris

Horacio wrote:
> Dimitris,
>
> My DSL files are not EMf resources, they are just plain text files. The
> generator project created as part of a xtext project is used to read
> your dsl files and transform them to text. In the generated workflow the
> dsl file (model) is read with:
>
> <component class="org.eclipse.xtext.MweReader" uri="${modelFile}">
> <!-- this class will be generated by the xtext generator -->
> <register class="org.xtext.example.DieselStandaloneSetup"/>
> </component>
>
>
> So it seems that that java class is needed to "interpret" my dsl files
> and load them to a interpretable xmi instance to use in the
> transformations.
>
> My guess is that I have to make an ant file to run my transformations
> (and not a configuration) and include the above component to access my
> dsl files as models?
>
> Regards,
>
> Horacio
>
>
>
>


--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
Previous Topic:samples of inter-model consystency
Next Topic:Annotations in EOL
Goto Forum:
  


Current Time: Fri Apr 19 22:13:18 GMT 2024

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

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

Back to the top