Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » EReference
EReference [message #874821] Mon, 21 May 2012 15:48 Go to next message
Kosala Yapa is currently offline Kosala YapaFriend
Messages: 159
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}


-- @path source=file:/C:/.../Module.ecore
-- @path target=file:/C:/.../Model.ecore

create OUT : target from IN : source;

rule Rule_1{
d:target!ModelList( <-


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

Re: EReference [message #955202 is a reply to message #874821] Tue, 23 October 2012 15:54 Go to previous message
Cesar Caves is currently offline Cesar CavesFriend
Messages: 29
Registered: July 2009
Junior Member

I think you need a matched rule like the following

rule Module_2_Model {
    input : source!Module
    output : target!Model (
      name <-,
      address <- input.address

So in the bindings of your rule you could write: modelItem <- a.moduleItem

[Updated on: Tue, 23 October 2012 16:02]

Report message to a moderator

Previous Topic:write sequence
Next Topic:How to inject code into java model MethodDeclaration
Goto Forum:

Current Time: Mon Apr 23 19:38:29 GMT 2018

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

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