Skip to main content


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 23:50 Go to next message
Phillip Drew is currently offline Phillip DrewFriend
Messages: 77
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 08:42 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7665
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 23:32 Go to previous message
Phillip Drew is currently offline Phillip DrewFriend
Messages: 77
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: Sat Jul 27 09:24:47 GMT 2024

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

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

Back to the top