| EReference [message #874821] |
Mon, 21 May 2012 11:48  |
Kosala Yapa Messages: 133 Registered: September 2010 |
Senior Member |
|
|
Hi there,
class Module{ name, address}
class ModuleList{EReference moduleItem of the type Module}
class Model{name, address}
class ModelList{EReference modelItem of the type Model}
problem:
-- @path source=file:/C:/.../Module.ecore
-- @path target=file:/C:/.../Model.ecore
create OUT : target from IN : source;
rule Rule_1{
from
a:source!ModuleList
to
d:target!ModelList(
modelItem.name <- a.moduleItem.name
)
}
Error: no viable alternative at input '.'
Can someone tell me how to resolve this issue? In some other terms, how to use EReferences in ATL programming? Could someone show me a simple example?
Thanks in advance
K
|
|
|
| Re: EReference [message #955202 is a reply to message #874821] |
Tue, 23 October 2012 11:54  |
Cesar Caves Messages: 22 Registered: July 2009 |
Junior Member |
|
|
Hi
I think you need a matched rule like the following
rule Module_2_Model {
from
input : source!Module
to
output : target!Model (
name <- input.name,
address <- input.address
)
}
So in the bindings of your rule you could write: modelItem <- a.moduleItem
[Updated on: Tue, 23 October 2012 12:02] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.01488 seconds