Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Acceleo 3] recursive import not supported
[Acceleo 3] recursive import not supported [message #649287] Tue, 18 January 2011 15:39 Go to next message
Christophe Demarey is currently offline Christophe DemareyFriend
Messages: 6
Registered: November 2010
Junior Member
Hi all,

I face problems with the import directive. It doesn't import templates recursively, and so the generation output is not the one expected.
I created a small project to explain that (importbug.zip). There is a basic metamodel, an instance of it and 3 templates.

A concept named 'container' holds references to A concepts. AA and AB concepts inherits from A.

The main template (generate) calls the genA template on A elements hold in the container. The genA template is defined in generateA.mtl. Specializations of the genA template are defined in generateAA.mtl. generate.mtl imports generateA.mtl importing generateAA.mtl itself.

The expected result for the given model (container.xmi) is:
        genA
	genAA
	genAB

but I got
	genA
	genA
	genA

It seems like a bug (or a missing feature), right?

Regards,
Christophe.
Re: [Acceleo 3] recursive import not supported [message #649298 is a reply to message #649287] Tue, 18 January 2011 16:27 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 Christophe,

Could you show us a small example of your templates ? Because from our point of you it seems to be a simple problem of polymorphism, keep in mind that the type of an element is resolved during the runtime.

Stephane Begaudeau, Obeo
Re: [Acceleo 3] recursive import not supported [message #649330 is a reply to message #649298] Tue, 18 January 2011 18:37 Go to previous messageGo to next message
Christophe Demarey is currently offline Christophe DemareyFriend
Messages: 6
Registered: November 2010
Junior Member
Hi Stephane,

The whole project can be downloaded with the link provided in my first message. this is not a polymorphism problem. This sample works fine if you merge the generateA and the generateAA templates.

Regards,
Christophe.
Re: [Acceleo 3] recursive import not supported [message #649439 is a reply to message #649287] Wed, 19 January 2011 09:08 Go to previous message
Stephane Begaudeau is currently offline Stephane BegaudeauFriend
Messages: 458
Registered: April 2010
Location: Nantes (France)
Senior Member

Hi Christophe,

I'm sorry I didn't see the zip archive before Smile
So, the problem is clearly coming from recursive imports that are not supported and we do not intend to support it (just like in Java).

Stephane Begaudeau, Obeo.
Previous Topic:[Acceleo 3] Casting to supertype necessary!
Next Topic:[Acceleo 3] Problems in memory management
Goto Forum:
  


Current Time: Fri Mar 29 14:34:31 GMT 2024

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

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

Back to the top