Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » Manage custome UML stereotypes out of Eclipse in ATL transformations
Manage custome UML stereotypes out of Eclipse in ATL transformations [message #1775172] Wed, 25 October 2017 18:16
Carlos Sáenz  is currently offline Carlos Sáenz Friend
Messages: 6
Registered: May 2017
Junior Member
Hello,

I am working with ATL and I would like to transform UML together with UML stereotypes to my custom metamodel. This transformation will trigger different rules depending of the assigned UML sterotype. I use the following code to detect if the stereotype exsist:

helper context UML!Element def: hasStereotype(stereotype : String) :
Boolean = self.getAppliedStereotypes() -> collect(st | st.name) -> includes(stereotype);

It works properly in the context of Eclipse, by running it with its ATL Configuration (e.g. Metamodels, Source Models...). However, when I execute this same ATL file from my java code, it works like UML stereotypes don't exist.

This is the launcher code together with the options:

   public Object doC2PROV(IProgressMonitor monitor) throws ATLCoreException, IOException, ATLExecutionException {
     ILauncher launcher = new EMFVMLauncher();
     Map<String, Object> launcherOptions = getOptions();
     launcher.initialize(launcherOptions);
     launcher.addInModel(inModel, "IN", "UML");
     launcher.addOutModel(outModel, "OUT", "PROV");
     return launcher.launch("run", monitor, launcherOptions, (Object[]) getModulesList());
 }


Options:
# ATL Launching options
supportUML2Stereotypes = true
OPTION_CONTENT_TYPE = false
step = false
allowInterModelReferences = true
printExecutionTime = false

[Updated on: Wed, 25 October 2017 18:18]

Report message to a moderator

Previous Topic:Problem Creating a Dependency relation in UML with ATL
Next Topic:ATL : multiple target from one source object
Goto Forum:
  


Current Time: Fri Jul 20 01:08:51 GMT 2018

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

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

Back to the top