[ATL] Refining Mode: refine more than one element [message #788071] |
Wed, 01 February 2012 10:11 |
Eclipse User |
|
|
|
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
Best regards,
stoehm
|
|
|
Powered by
FUDForum. Page generated in 0.03379 seconds