Skip to main content



      Home
Home » Modeling » ATL » Transformation parameters
Transformation parameters [message #1857497] Fri, 10 February 2023 06:50 Go to next message
Eclipse UserFriend
I want to specify parameters for a transformation.

There is an "How to" about this here: https://wiki.eclipse.org/ATL/Howtos#How_do_I_declare.2Fuse_external_parameters_in_ATL_transformations.3F

However it does not seem to work as specified. This is illustrated in the attached sample that generate the following exception when I try to execute it:

org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri 'null' not found. (platform:/resource/[...]/TestScope.xml, 2, 13)

Any idea?
Re: Transformation parameters [message #1857505 is a reply to message #1857497] Sat, 11 February 2023 13:38 Go to previous messageGo to next message
Eclipse UserFriend
EMFTVM does not support the XML injector that can load schema-less XML into an EMF model. There are several other ways to provide parameters in a separate file to a transformation:

  1. In an ATL library with helper attributes
  2. In a separate Ecore model, e.g. by using EAnnotations

See attached zipped Eclipse project for an example of the second option.
Re: Transformation parameters [message #1857522 is a reply to message #1857505] Mon, 13 February 2023 08:53 Go to previous messageGo to next message
Eclipse UserFriend
Hello Dennis,

Thanks you. I'll study it.
On the other hand, do you mean that adding a XML schema would also be an alternative?

Re: Transformation parameters [message #1857781 is a reply to message #1857522] Sat, 25 February 2023 09:15 Go to previous messageGo to next message
Eclipse UserFriend
Yves BERNARD wrote on Mon, 13 February 2023 14:53

On the other hand, do you mean that adding a XML schema would also be an alternative?

Using XML schema with EMF is much more labour intensive, even more so than defining a dedicated metamodel for parameters. See https://www.eclipse.org/modeling/emf/docs/2.x/tutorials/xlibmod/xlibmod_emf2.0.html

If you're looking for a generic parameter metamodel, here's an example: https://git.eclipse.org/c/mmt/org.eclipse.atl.git/tree/usecases/org.eclipse.m2m.atl.research.aml/dsls/AML/Metamodel/Parameter.ecore
Re: Transformation parameters [message #1858150 is a reply to message #1857781] Fri, 17 March 2023 09:21 Go to previous message
Eclipse UserFriend
Thanks Dennis, eventually I decided to use the "ecore" solution as you suggest. It is convenient, indeed.
Previous Topic:Is it possible to increment and store a variable in helper context declerative part?
Next Topic:Conditional Breakpoints in ATL?
Goto Forum:
  


Current Time: Mon Oct 27 14:05:07 EDT 2025

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

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

Back to the top