Generating an EReference (containment = false) [message #94223] |
Fri, 31 October 2008 09:46 |
Eclipse User |
|
|
|
I have a little problem generating a reference to an already generated
element. Fir instance i have an abstract class with a stereotype "memory"
(example), then another class (memoryDevice) that realizes that memory
class. So i generate a memory for each abstract memory class then i
generate a memoryDevice class for each class stereotyped memoryDevice.
Then i want to reference for each memoryDevice, the memory that it
realizes.
Here is the code:
rule myMemory {
from s : UML2!Class
to t : MM!Memory (
name <- s.name,
)
}
rule myMemoryDevice {
from s : UML2!Class
to t : MM!MemoryDevice (
name <- s.name,
memoryRealized <- myMemory
),
myMemory : MM!Memory( ###Is it true to choose this type if
###the reference is not a
containment?
###(i don't think so)
--name <- s.name
)}
Questions:
- What is the target type that i have to use in the rule
(myMemoryDevice) when the metamodel it is an EReference with containment =
false (by default)
- In ATL, can we do such things : references (other than containments)?
Thanks in advance!
|
|
|
Powered by
FUDForum. Page generated in 0.31201 seconds