Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Acceleo 3] Multiple metamodels
[Acceleo 3] Multiple metamodels [message #651496] Mon, 31 January 2011 12:45 Go to next message
Supernova S. is currently offline Supernova S.Friend
Messages: 5
Registered: January 2011
Junior Member
Is it possible in the new version of Acceleo (3.xx) to use more than one metamodel in a generation template/module? It would be great if you can provide some information on how to do this.

Thanks,
Mehrdad

[Updated on: Mon, 31 January 2011 12:49]

Report message to a moderator

Re: [Acceleo 3] Multiple metamodels [message #651536 is a reply to message #651496] Mon, 31 January 2011 15:26 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,

[module myModule('myMetamodel1', 'myMetamodel2', 'myMetamodel3')/]

Stephane Begaudeau, Obeo
Re: [Acceleo 3] Multiple metamodels [message #652019 is a reply to message #651536] Wed, 02 February 2011 13:13 Go to previous messageGo to next message
Supernova S. is currently offline Supernova S.Friend
Messages: 5
Registered: January 2011
Junior Member
Thanks!

was this feature to use multiple metamodels also possible in acceleo 2.x?

Re: [Acceleo 3] Multiple metamodels [message #652059 is a reply to message #652019] Wed, 02 February 2011 14:46 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------030008010906020608050507
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Hi Mehrdad,

And nope, this wasn't possible with the Acceleo 2.* stream and has been
added for 3.*.

Laurent Goubet
Obeo

On 02/02/2011 14:13, Mehrdad Saadatmand wrote:
> Thanks!
>
> was this feature to use multiple metamodels also possible in acceleo 2.x?
>
>


--------------030008010906020608050507
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="laurent_goubet.vcf"

YmVnaW46dmNhcmQNCmZuOkxhdXJlbnQgR291YmV0DQpuOkdvdWJldDtMYXVy ZW50DQpvcmc6
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyIj5PYmVvPC9hPg0KZW1haWw7 aW50ZXJuZXQ6
bGF1cmVudC5nb3ViZXRAb2Jlby5mcg0KdXJsOmh0dHA6Ly93d3cub2Jlby5m cg0KdmVyc2lv
bjoyLjENCmVuZDp2Y2FyZA0KDQo=
--------------030008010906020608050507--
Re: [Acceleo 3] Multiple metamodels [message #931864 is a reply to message #652059] Wed, 03 October 2012 15:42 Go to previous messageGo to next message
Frederik Gailly is currently offline Frederik GaillyFriend
Messages: 5
Registered: October 2012
Junior Member
Hello,

I have a related problem. My mtl file recognizes my two metamodels but after running the file I do not get the correct result because it seems that the generator can only access the instantiation of my first metamodel and not the instantiation of my second metamodel.

Put differently: Is it possible two add 2 models as input files which contain references to each other.

Regards,
Frederik
Re: [Acceleo 3] Multiple metamodels [message #938858 is a reply to message #931864] Wed, 10 October 2012 08:10 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,

If you want to use multiple models in your generator, you should start with one of the models and then navigate to elements of the second one in the generator. If the second one is not loaded, you can use the code in the comment in the method "doGenerate" (//org.eclipse.emf.ecore.util.EcoreUtil.resolveAll(model)).

Regards,

Stephane Begaudeau, Obeo

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

[Updated on: Wed, 10 October 2012 08:10]

Report message to a moderator

Re: [Acceleo 3] Multiple metamodels [message #1737068 is a reply to message #938858] Tue, 05 July 2016 13:01 Go to previous message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
[edited out : wrong thread]

[Updated on: Tue, 05 July 2016 13:13]

Report message to a moderator

Previous Topic:[Acceleo] PackageNotFoundException
Next Topic:Two input models in Acceleo
Goto Forum:
  


Current Time: Fri Nov 08 22:00:03 GMT 2024

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

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

Back to the top