Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » ATL beginner question
ATL beginner question [message #88396] Fri, 15 August 2008 10:57 Go to next message
Eclipse UserFriend
Originally posted by: PetkoSAP.gmail.com

Hi,
I am new to ATL and I am trying my first very simple transformation. I
have a metamodel called processmap.ecore having EClass Map and an
attributeof the Map - title. I want to map the Map.title to an UML
Package.name. My code is the following
rule MapToPackage {

from m : processmap!Map

to p : UML!Package (
name <- m.title
)
}

But I get a strange error on the line from m : processmap!Map namely
mismatched input 'Map' expecting NAME
Why is it not accepting the Map element? What kind of Name is being
expected ...
Thank you for the answer
Petko
Re: ATL beginner question [message #88411 is a reply to message #88396] Fri, 15 August 2008 16:09 Go to previous message
Alfons Laarman is currently offline Alfons LaarmanFriend
Messages: 71
Registered: July 2009
Member
Hi,
Map is a keyword in ATL. Like Sequence, Set, etc.
You can escape keywords using quotes: processmap!"Map"

kind regards,

Alfons


"Petko" <PetkoSAP@gmail.com> schreef in bericht
news:194bddcb178f66267c91f7ee0b2719b8$1@www.eclipse.org...
> Hi,
> I am new to ATL and I am trying my first very simple transformation. I
> have a metamodel called processmap.ecore having EClass Map and an
> attributeof the Map - title. I want to map the Map.title to an UML
> Package.name. My code is the following
> rule MapToPackage {
>
> from m : processmap!Map
>
> to p : UML!Package (
> name <- m.title )
> }
>
> But I get a strange error on the line from m : processmap!Map namely
> mismatched input 'Map' expecting NAME Why is it not accepting the Map
> element? What kind of Name is being expected ...
> Thank you for the answer
> Petko
>
Previous Topic:loading programmatically
Next Topic:problem with uml2 repository
Goto Forum:
  


Current Time: Thu Apr 25 08:52:39 GMT 2024

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

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

Back to the top