Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » Acceleo not reading metamodels properly(Acceleo is not reading EMF metamodels correctly)
Acceleo not reading metamodels properly [message #1340072] Wed, 07 May 2014 19:50 Go to next message
Phillip Drew is currently offline Phillip Drew
Messages: 72
Registered: October 2012
Member
Ok so I have three EMF metamodels which reference each other.

A
B
C

where B depends on A
and C depends on A and B

All the relevant editors and manual code that interacts with the three models still works fine.

However when trying to run an Acceleo template with C, the Acceleo runtime isn't correctly loading the relevant models A and B.

At runtime the references between objects from metamodel C to objects from metamodel A don't appear to be read because the variables I can see when debugging are just the default values for the object in A's attributes.

At the same time the Acceleo runtime doesn't seem to be reading the metamodel correctly because the attributes visible in the debugger (with their default values) aren't all the attributes present in the actual object - it's not showing inherited attributes at all.

Of course this then leads to various null pointer exceptions etc. in my OCL expressions preventing anything meaningful from being generated.
Re: Acceleo not reading metamodels properly [message #1340942 is a reply to message #1340072] Thu, 08 May 2014 04:42 Go to previous messageGo to next message
Ed Willink is currently offline Ed Willink
Messages: 4014
Registered: July 2009
Senior Member
Hi

You provide very few details, so let me guess.

You have not registered your genmodelled packages as described in the
comments of the generated Acceleo main template.

Regards

Ed Willink


On 08/05/2014 00:50, Phillip Drew wrote:
> Ok so I have three EMF metamodels which reference each other.
>
> A
> B
> C
>
> where B depends on A
> and C depends on A and B
>
> All the relevant editors and manual code that interacts with the three
> models still works fine.
>
> However when trying to run an Acceleo template with C, the Acceleo
> runtime isn't correctly loading the relevant models A and B.
>
> At runtime the references between objects from metamodel C to objects
> from metamodel A don't appear to be read because the variables I can
> see when debugging are just the default values for the object in A's
> attributes.
> At the same time the Acceleo runtime doesn't seem to be reading the
> metamodel correctly because the attributes visible in the debugger
> (with their default values) aren't all the attributes present in the
> actual object - it's not showing inherited attributes at all.
>
> Of course this then leads to various null pointer exceptions etc. in
> my OCL expressions preventing anything meaningful from being generated.
Re: Acceleo not reading metamodels properly [message #1344825 is a reply to message #1340942] Fri, 09 May 2014 19:32 Go to previous message
Phillip Drew is currently offline Phillip Drew
Messages: 72
Registered: October 2012
Member
The comments suggest that I shouldn't have to / shouldn't because those packages are within my Eclipse workspace?

Long story short I did a full eclipse refresh (restarting and wiping out various little temp data files that Eclipse spawns) and Acceleo resumed being able to properly read my model files.
Previous Topic:[Xpand] Programmatic tutorial?
Next Topic: Import existing acceleo project in eclipse.
Goto Forum:
  


Current Time: Fri Aug 01 05:59:03 EDT 2014

Powered by FUDForum. Page generated in 0.01798 seconds