I have a UML activity with OpaqueActions containing a DSL. The DSL grammar is expressed by means of XText thus there is an EMF ECORE model and editor for it. I have an ACCELEO M2T transformation transforming UML activities in text and I'd like to trigger (from such transformation) another transformation (from the DSL meta-model to text) providing as input the DSL containing in the opaque actions of the activity. Is there any way to easily do that?
Asked
Active
Viewed 235 times
1 Answers
1
You can create two generators, one for your UML transformation and the second one for your DSL and call the first one from the second one once you encounter your DSL elements while navigating in your UML model.

user229044
- 232,980
- 40
- 330
- 338

sbegaudeau
- 1,504
- 13
- 18
-
I see but I guess the DSL will appear just like a String while in the UML transformation. How can I apply a transformation to its root element if the whole DSL model (contained into an opaque action) is managed as a string? – Andrea Sindico Aug 01 '12 at 20:48
-
Please [don't use signatures or taglines in your posts](http://stackoverflow.com/faq#signatures). Feel free to flag this comment as obsolete once you've read it. – user229044 Aug 01 '12 at 20:51
-
You would have to use a Java service in order to call Xtext to transform the string into a model that the rest of the generation will be able to process. – sbegaudeau Aug 02 '12 at 07:43
-
I did exactly what you suggested and it almost works. I still have a small problem in the acceleo side, see this question http://stackoverflow.com/questions/11966797/meshing-acceleo-with-xtext – Andrea Sindico Aug 15 '12 at 17:22