|Re: M2M transformation reports [message #811733 is a reply to message #811592]
||Fri, 02 March 2012 19:02
| Meinte Boersma
Registered: July 2009
Location: Leiden, Netherlands
It seems like you actually have a transformation which takes an entire ResourceSet instead of a lot of separate Resource-s (i.e., IDL model files), at least for the report side of things.|
Karsten wrote a blog about how to do just that: http://kthoms.wordpress.com/2011/07/12/xtend-generating-from-multiple-input-models/
You have to adapt the sources a little to account for differences between the version of Xtext available at the time of writing and now, but that's more or less evident (and make to sure to shout out here in case it isn't).
The drawback of this is that the ResourceSet is potentially a memory hog, even if the output models are relatively small (for the reports) or can be generated on a per-Resource basis (for the transformed meta models).
To mesh the two transformations (-> meta models, -> reports) a little better, you could take a sort of monadic approach by wrapping generated meta model artifacts together with generated report texts at all levels, and unpacking the wrapping at the right spot to either serialize the meta model or the reports part. I really should provide an example for this, but haven't got time to do so now...
Xtext blogs: executable models...again? | workshop material | custom scoping with Xtend
Powered by FUDForum
. Page generated in 0.02068 seconds