Mixing Other Frameworks [message #517252] |
Fri, 26 February 2010 12:00  |
Eclipse User |
|
|
|
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 #520408 is a reply to message #520246] |
Fri, 12 March 2010 04:38  |
Eclipse User |
|
|
|
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 11:50  |
Eclipse User |
|
|
|
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
|
|
|
Re: Mixing Other Frameworks [message #587380 is a reply to message #587368] |
Fri, 12 March 2010 04:38  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.06259 seconds