Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] Refining Mode: refine more than one element
[ATL] Refining Mode: refine more than one element [message #788071] Wed, 01 February 2012 10:11
st oehm is currently offline st oehmFriend
Messages: 79
Registered: October 2009
Member
Hi everyone,

I am working on the refactoring of UML models and therefore I use the ATL refining mode.

My question: is it possible to refine more than one element in an ATL rule (see example below)?

create OUT: UML refining IN: UML

rule Example {
   from
      class1: UML!Class,
      class2: UML!Class (
         class1.name = 'class1' and
         class2.name = 'class2'
      )

   to
      class1Refined: UML!Class (
         name <- 'Refined:' + class1.name
      ),
      class2Refined: UML!Class (
         name <- 'I don't wanna be newly created but also refined'
      )
}


As you can see, I am matching two classes by name.

In the 'to'-block, only the first element (in this case 'class1Refined') refines the first element given in the 'from'-block (so 'class1').
In contrast, 'class2Refined' is newly created by ATL in the UML model.

Is there any possibility to also refine the matched element 'class2'?

Unluckily, documentation on the refining mode of ATL is not very detailed.

Any answer will be appreciated and if there are any unclarities, please ask Smile

Best regards,
stoehm
Previous Topic:[QVTo] Project status and plan
Next Topic:[QVTo] Support for advanced mathematical operations on numerical data types, e.g. exp() and log()
Goto Forum:
  


Current Time: Fri Apr 26 03:58:21 GMT 2024

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

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

Back to the top