[ATL] How to refer to superclasses [message #81635] |
Mon, 19 May 2008 09:12 |
Eclipse User |
|
|
|
Originally posted by: kokoigo.yahoo.com
I am very new in ATL. Sorry if my question is so basic.
So far i am trasforming from umlbMetamodel to TDMetamodel.
My problem is i have to use an attribute "name", which is defined in a
class on the top of a TDMetamodel. So, I don't know how to refer to
superclass of superclass of superclass along the associations. Can i do
either of the options belows ?
1) Use multiple eContainer() such as
rule ContextAxiom {
from t : TDMetamodel!TDTiming
to u : umlbMetamodel!UMLBConstant
(name <- 'LOWER_LIMIT_' +
t.eContainer().eContainer().eContainer().name )
}
2) Use assoication's name between Classes such as
rule ContextAxiom {
from t : TDMetamodel!TDTiming
to u : umlbMetamodel!UMLBConstant
(name <- 'LOWER_LIMIT_' + t.timing.constraints.segments.name )
}
Note that : timing, constraints and segments are association names.
I tried both ways but non of them work now. So, i am not sure if i use it
correct. Please give me suggestion. Thank you very much.
|
|
|
|
Powered by
FUDForum. Page generated in 0.04401 seconds