\n","author":{"@type":"Person","name":"Soulimane Kamni"},"upvoteCount":0,"answerCount":2,"acceptedAnswer":{"@type":"Answer","text":"
I found what I was looking for. I am using Xtend with Xtext. A ".xtend" file is generated once the grammar is compiled. This file contains a method called doGenerate. It is here where I am transforming my code which is conforming to its xtext grammar to a Capella XML and inject it directly in the "melodymodeller" Capella project file.
\nThank you all for your answers.
\n","author":{"@type":"Person","name":"Soulimane Kamni"},"upvoteCount":0}}}Reputation: 15
I have created a grammar using xtext, and generated the DSL. Now, I want to transform the DSL elements (program that is conforming to the grammar) to XML elements. So, I am wondering if there is a framework that allows to do that using Java for example. I could open the files having the extension of the DSL using the eclipse editor "Sample Reflective Ecore Model Editor" and could visualize the elements of the DSL.
Upvotes: 0
Views: 213
Reputation: 15
I found what I was looking for. I am using Xtend with Xtext. A ".xtend" file is generated once the grammar is compiled. This file contains a method called doGenerate. It is here where I am transforming my code which is conforming to its xtext grammar to a Capella XML and inject it directly in the "melodymodeller" Capella project file.
Thank you all for your answers.
Upvotes: 0
Reputation: 11
Do you mean a transformation to the Capella Model? Then I would suggest not the XML, but bundle the Capella EMF model with your Xtext RCP and do a model-to-model transformation based on EMF (I would suggest Xtend, but QVT, Acceleo etc. can be used, too)
Upvotes: 1