Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [acceleo 3.1] editor doesn't see inheritance
[acceleo 3.1] editor doesn't see inheritance [message #725703] Thu, 15 September 2011 14:49 Go to next message
Maxime Jeanmart is currently offline Maxime JeanmartFriend
Messages: 35
Registered: November 2010
Member
Hi,

I have a class called MetaModel located in b.ecore. it extends Artifact located in a.ecore.

The acceleo editor code assist suggests the attributes from MetaModel class but not from Artifact. If I type one of these manually, then the editor shows an error marker.

Any idea what could be the problem?

Here is how my template looks like:
[module genmodelGen('/plugina/model/a.ecore','/pluginb/model/b.ecore','http://www.eclipse.org/emf/2002/Ecore')/]
[template public genmodelGenComponent(c : MetaModel)]
    modelPluginID="[c.id/]" 
    modelName="[c.emfPackage/]" 
[/template]


c.id is not recognized and is part of Artifact class. c.emfPackage is recognized and is part of MetaModel.

Max
Re: [acceleo 3.1] editor doesn't see inheritance [message #725999 is a reply to message #725703] Fri, 16 September 2011 11:35 Go to previous messageGo to next message
Maxime Jeanmart is currently offline Maxime JeanmartFriend
Messages: 35
Registered: November 2010
Member
so I had to use oclAsType. Is there a way to avoid using this API?

[Updated on: Fri, 16 September 2011 12:13]

Report message to a moderator

Re: [acceleo 3.1] editor doesn't see inheritance [message #726796 is a reply to message #725999] Mon, 19 September 2011 15:17 Go to previous messageGo to next message
Stephane Begaudeau is currently offline Stephane BegaudeauFriend
Messages: 458
Registered: April 2010
Location: Nantes (France)
Senior Member

Hi Maxime,

Quote:
Is there a way to avoid using this API?

What you are trying to do should work.

I have tried to recreate the conditions of your environment and it worked for me as you can see it in this screenshot:
https://lh6.googleusercontent.com/-sx3rmeM1n2M/TndcSk7kWLI/AAAAAAAAAfA/IiOygrPTYnI/s600/metamodels.png

Does your project have a dependency with the two projects containing the metamodels? Are you using the binary serialization? (right click on your project -> properties -> acceleo), if yes, try XMI. Do you have the latest version of Acceleo 3.1.1? Could you try with it. I'll investigate more to see what could be the source of the problem.

Regards,

Stephane Begaudeau, Obeo

--
Twitter: @sbegaudeau
Google+: stephane.begaudeau
Blog: http://stephanebegaudeau.tumblr.com
Acceleo Documentation: http://docs.obeonetwork.com/acceleo

[Updated on: Mon, 19 September 2011 15:18]

Report message to a moderator

Re: [acceleo 3.1] editor doesn't see inheritance [message #728398 is a reply to message #726796] Fri, 23 September 2011 08:13 Go to previous messageGo to next message
Sebastien GABEL is currently offline Sebastien GABELFriend
Messages: 6
Registered: July 2009
Location: Toulouse
Junior Member
Hello Stéphane,

I'm facing exactly the same problem on my project developped under Eclipse 3.5.2 with Acceleo 3.0.1.
In the editor's content assist, impossible to see the inherited attributes and references.
I don't know how to solve it ! I should use oclAsType() everywhere ! Project dependencies seem to be OK.

Regards,

Sébastien
Re: [acceleo 3.1] editor doesn't see inheritance [message #728540 is a reply to message #728398] Fri, 23 September 2011 13:04 Go to previous messageGo to next message
Stephane Begaudeau is currently offline Stephane BegaudeauFriend
Messages: 458
Registered: April 2010
Location: Nantes (France)
Senior Member

Hi,

It is something that we improved for Acceleo 3.1.x so I'm not surprised if some problems appear in Acceleo 3.0.x

Regards,

Stephane Begaudeau, Obeo

--
Twitter: @sbegaudeau
Google+: stephane.begaudeau
Blog: http://stephanebegaudeau.tumblr.com
Acceleo Documentation: http://docs.obeonetwork.com/acceleo

[Updated on: Fri, 23 September 2011 13:04]

Report message to a moderator

Re: [acceleo 3.1] editor doesn't see inheritance [message #729442 is a reply to message #728540] Mon, 26 September 2011 08:13 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
Sébastien,

As Stéphane mentionned, there have been a great deal of improvements in Acceleo 3.1 towards the resolution of metamodel dependencies in the modules. Do you have a particular reason for staying on the 3.0 stream? The 3.1 stream supports the same platforms as 3.0 did (all the way back to Eclipse 3.4 : http://wiki.eclipse.org/Acceleo/Compatibility). You can try installing it through the update site http://download.eclipse.org/modeling/m2t/acceleo/updates/releases/3.1 on any supported platform (http://wiki.eclipse.org/Acceleo/Installation).

If you do need to remain on the 3.0 stream, I cannot help more than Stephane did; you'll have to resort to "oclAsType" everywhere Acceleo does not manage to infer the type. Maybe try to import all needed metamodels in the module header, but if that does not help, then you're stuck with casting.

Laurent Goubet
Obeo
Re: [acceleo 3.1] editor doesn't see inheritance [message #729485 is a reply to message #729442] Mon, 26 September 2011 09:54 Go to previous message
Sebastien GABEL is currently offline Sebastien GABELFriend
Messages: 6
Registered: July 2009
Location: Toulouse
Junior Member
Hi Laurent and Stephane.

First, thanks for your replies.
No particular reasons for staying on the 3.0 stream. My main constraint is to use Eclipse 3.5.2 as target platform. When I installed my development platform, Acceleo 3.0.1 came with it ! Actually, I was not aware about the compliance between Acceleo 3.1.X and Eclipse 3.5.X. So, it's a great news for me !!!

Ok, update done to Acceleo 3.1.1. Behavior is better. My problem of cast is solved.
Thanks !

Sébastien

[Updated on: Mon, 26 September 2011 09:55]

Report message to a moderator

Previous Topic:[ACCELEO 3] Retrieving the class from a stereotype
Next Topic:Out of Order text generation
Goto Forum:
  


Current Time: Wed Apr 24 18:10:11 GMT 2024

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

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

Back to the top