[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.m2m] Re: [QVT] Call QVT from Java code/command line

Hi David,

Java API for transformation launching is org.eclipse.m2m.qvt.oml.runtime.util.QvtoTransformationHelper class.

Usage examples can be found in 'org.eclipse.m2m.qvt.oml.tests' plugin.

Code snippet:
URI scriptUri = ..
List<EObject> inObjects = ..
TransfExecutionResult execResult = new QvtoTransformationHelper(scriptUri).executeTransformation(inObjects, Collections.<String, Object>emptyMap(), null);


Where 'scriptUri' can specify file, platform resource or bundled script (using platform:/plugin/ form).

Transformation output extents are created in memory. Persistence is responsibility of caller.

Regards,
  Sergey


David wrote:
Hi,

Another question :-) for QVT

Is there any way that we can call call QVT from java code? Even further, if we can, can we get the root (pointer) for the output model instance (in memory), not a file?
Thanks.


David