On 20/09/2010 09:32, Phu H. Nguyen wrote:
First I would like to thank for
suggestions from Ed
I tried several ways and I have
found out that it is possible to obtain AST of corresponding QVTo file
by using the InternalTransformationExecutor:
executor = new InternalTransformationExecutor(transformationURI);
Via the OperationalTransformation
generated AST can be accessed
certainly conforms to the metamodels QVTOperational.ecore
now it is possible to extract some information from the AST, i.e. names
of modeltype, transformation, name of mapping operations. However I
have not found out the way to access other parts, i.e. bodies of mapping
operation. Are there any suggestions?
but not least, it would be much better to access the AST if there is a
way to serialize it. The ATL tool kit allows obtaining the file of ATL
model (generated AST) quite easily. I was wondering if QVTO tool kit
has a similar function?
you have any suggestions, please let me know. Thank you very much!
On Mon, Sep 13, 2010 at 11:25 PM, Sergey
From: Sergey Boyko
Sent: Tuesday, September 14, 2010 01:24
Subject: RE: [m2m-dev] Quality Assessment of QVTO Model
QVTo engine is able to be launched outside Eclipse.
Inside Eclipse you can obtain AST of corresponding
.qvto by means of EMF Resource, i.e. some like follows:
URI uri = URI.createURI("file:/.../my.qvto");
Resource res = new ResourceSetImpl().createResource(uri);
EObject qvtoModule = res.getContents().get(0);
Generated AST is conformed to
org.eclipse.m2m.qvt.oml/model/QVTOperational.ecore (for QVTOperational
ImperativeOCL package). In fact that models have some (very minor)
deviations from official OMG QVTO metamodels.