Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » Transformation parameters
Transformation parameters [message #1857497] Fri, 10 February 2023 11:50 Go to next message
Yves BERNARD is currently offline Yves BERNARDFriend
Messages: 152
Registered: July 2014
Senior Member
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?


Yves
Re: Transformation parameters [message #1857505 is a reply to message #1857497] Sat, 11 February 2023 18:38 Go to previous messageGo to next message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 589
Registered: September 2012
Location: Belgium
Senior Member

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.


Cheers,
Dennis
Re: Transformation parameters [message #1857522 is a reply to message #1857505] Mon, 13 February 2023 13:53 Go to previous messageGo to next message
Yves BERNARD is currently offline Yves BERNARDFriend
Messages: 152
Registered: July 2014
Senior Member
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?



Yves
Re: Transformation parameters [message #1857781 is a reply to message #1857522] Sat, 25 February 2023 14:15 Go to previous messageGo to next message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 589
Registered: September 2012
Location: Belgium
Senior Member

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


Cheers,
Dennis
Re: Transformation parameters [message #1858150 is a reply to message #1857781] Fri, 17 March 2023 13:21 Go to previous message
Yves BERNARD is currently offline Yves BERNARDFriend
Messages: 152
Registered: July 2014
Senior Member
Thanks Dennis, eventually I decided to use the "ecore" solution as you suggest. It is convenient, indeed.

Yves
Previous Topic:Accessing inherited tag values from applied stereotypes
Next Topic:Conditional Breakpoints in ATL?
Goto Forum:
  


Current Time: Fri Apr 19 04:02:28 GMT 2024

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

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

Back to the top