Acceleo not reading metamodels properly [message #1340072] |
Wed, 07 May 2014 23:50  |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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.
|
|
|
Powered by
FUDForum. Page generated in 0.23368 seconds