|Re: QVT - how to programatically retrieve the model(AST) from the transformation script [message #500699 is a reply to message #500685]
||Fri, 27 November 2009 15:03
Originally posted by: dvorak.radek.gmail.com|
You can do it just like this,
EList<EObject> contents = new ResourceSetImpl().getResource(uri,
OperationalTransformation transf =
ModelType modelType =
EPackage usedMetamodel = modelType.getMetamodel().get(0);
Well, code a little bit more defensive then me ;).
Note, the AST classes are still from internal packages, though the AST
metamodel structure is pretty stable. It will be open, but can't say when
we have higher prio tasks at the moment.
On Fri, 27 Nov 2009 15:09:45 +0100, Dana Wong <firstname.lastname@example.org>
> Is it possible to programatically retrieve the abstract syntax tree of
> the QVT Transformation script?
> This is my use case:
> My QVT script transforms only a subset of the elements from the input
> model. I was hoping to analyse the model behind the qvt script so that I
> can determine which elements can and cannot be transformed from the
> input model . The input model elements that could not be transformed
> will then be written to a separate file.
> Thanks for your help.
> Thank you,
Powered by FUDForum
. Page generated in 0.03451 seconds