Hi,
I would like to invoke a Henshin transformation programmatically and save the target model in a different file than the source model (i.e. I would like my transformation to be out-place). So far I was able to do this as follows, using the
“ePackage” output parameter of my transformation:
UnitApplication application = new UnitApplicationImpl(engine, graph, unit, null);
application.execute(null);
EPackage result = (EPackage) application.getResultParameterValue("ePackage");
resourceSet.saveEObject(result, "target.ecore");
So my question is: Is there a way of executing an out-place transformation without depending on the existence of an appropriate output parameter of the transformation? I would like to simply save the entire target model, regardless if the
transformation has any parameters or not. I suspect this is possible, since the Henshin Eclipse plug-in is able to do it when executing transformations using the GUI.
Cheers,
Vlad
|
Vlad Acretoaie
|
PhD student
|
DTU Compute
|
|
Technical University of Denmark
|
|
Department of Applied Mathematics and Computer Science
|
Matematiktorvet
|
Building 303B, Room 055
|
DK - 2800 Kgs. Lyngby
|
Denmark
|
Direct +45 45253645
|
rvac@xxxxxx
|
www.compute.dtu.dk/~rvac
|
|