Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] running transformations programatically with superimpose
[ATL] running transformations programatically with superimpose [message #91114] Thu, 02 October 2008 19:15 Go to next message
neto Mising name is currently offline neto Mising nameFriend
Messages: 33
Registered: July 2009
Member
Hi,

i have a transformation that uses another transformation as superimposed
transformation. In the ATL plugin this transformation runs perfectly, and
programatically if i copy the superimposed transformation into the main
transformation, it works too.

But i dont know how programatically run a transformation with a
superimposed transformation. Someone knows how or has an example?

Thanks in advance.
Waldemar
Re: [ATL] running transformations programatically with superimpose [message #91144 is a reply to message #91114] Fri, 03 October 2008 08:33 Go to previous messageGo to next message
Gabriel BARBIER is currently offline Gabriel BARBIERFriend
Messages: 106
Registered: July 2009
Senior Member
Here is a basic example :

UML2Copy is the basic transformation
DependenciesCreation extends UML2Copy



URL basicTransformation = this.getClass().getResource(
transformationsLocation + "/UML2Copy.asm"
);
URL superimposedTransformation = this
getClass().getResource(
transformationsLocation +
"/DependenciesCreation.asm");

final Map<String, ASMModel> models = new HashMap<String,
ASMModel>();
final Map<?, ?> asmParams = Collections.EMPTY_MAP;
final List<URL> superimpose = new ArrayList<URL>();
Map<String, String> options = new HashMap<String,
String>();
final Map<?, ?> libs = Collections.EMPTY_MAP;

// metamodels
models.put("UML2", umlMM);
// source models
models.put("IN", umlSourceModel);
// target model
models.put("OUT", outputInstance);

// options
options.put("continueAfterError", "true");
options.put("AllowInterModelReferences", "true");

// superimpose
superimpose.add(superimposedTransformation);

/*
* Lancement de la transformation
*/
final AtlLauncher launcher = AtlLauncher.getDefault();
launcher.launch(basicTransformation, libs, models,
asmParams,
superimpose, options);

Regards,
Gabriel
Re: [ATL] running transformations programatically with superimpose [message #91479 is a reply to message #91144] Mon, 06 October 2008 23:11 Go to previous message
neto Mising name is currently offline neto Mising nameFriend
Messages: 33
Registered: July 2009
Member
Thanks Gabriel... it works... but i need load the superimposed
transformation models.

Waldemat
Previous Topic:[QVTO] Parser error using enumeration
Next Topic:[ATL] running transformations programatically under xmi
Goto Forum:
  


Current Time: Sat Jul 20 20:08:58 GMT 2024

Powered by FUDForum. Page generated in 0.03362 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top