Skip to main content



      Home
Home » Modeling » ATL » Listing inputs models
Listing inputs models [message #1866657] Tue, 04 June 2024 12:33 Go to next message
Eclipse UserFriend
Is there any means to get the list of all inputs models that have been specified in the run configuration of an ATL transformation (within that transformation)?

Indeed, it's possible to define many inputs models and they will be considered in the extent of input information to be processed, even if they are not explicitly listed in the module header. This is fine to me, because it facilitates writing more generic transformation and dealing with libraries (i.e. something that is reused on both sides and not recreated for each transformation) that may change from one model to another.

The point is that input models, whether they are explicitly listed in the header or not, may reference models that are not even identified in the run configuration and it looks like those models are considered as part of the inputs as well.

This can also make sense in order to avoid having unresolved references in the input pool. However it could be really useful to have a mean to distinguish, within the transformation, between those miscellaneous kind of models.

Do you have any solution for it?
Re: Listing inputs models [message #1866864 is a reply to message #1866657] Sun, 09 June 2024 11:29 Go to previous messageGo to next message
Eclipse UserFriend
Yes:
-- @atlcompiler emftvm
query InputModels = thisModule.getEnv().getInputModels().keySet().debug();

thisModule.getEnv() provides access to the current org.eclipse.m2m.atl.emftvm.ExecEnv instance. See also org.eclipse.m2m.atl.emftvm.util.OCLOperations.createOperations(OCLOperations.java:796) for all operations defined on "thisModule" (maps to the org.eclipse.m2m.atl.emftvm.ExecEnv type in EMFTVM).
Re: Listing inputs models [message #1867308 is a reply to message #1866864] Fri, 21 June 2024 02:42 Go to previous message
Eclipse UserFriend
Very good ! Thank you Dennis.
Previous Topic:OCL closure operation
Next Topic:ATL 4.10.0 released
Goto Forum:
  


Current Time: Tue Oct 28 06:45:04 EDT 2025

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

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

Back to the top