Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 337011

Summary: Acceleo with dynamic models appears to be broken
Product: [Modeling] Acceleo Reporter: Glenview Jeff <junk>
Component: CoreAssignee: Project Inbox <acceleo-inbox>
Status: CLOSED FIXED QA Contact:
Severity: blocker    
Priority: P3 CC: junk, stephane.begaudeau
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Dynamic metamodel example none

Description Glenview Jeff CLA 2011-02-11 17:28:23 EST
Build Identifier: M20100909-0800

I'm using Acceleo SDK 3.0.1.v201009150438.  I want to use dynamic models but it appears that this feature is broken.

1. Create an empty acceleo project
2. Create a simple ecore file with one top level class named AcceleoBug.
3. Create a new mtl generator file, select the newly created ecore file.

Note that the line in the template file that reads:
[file (a.name, false, 'UTF-8')]

has an error (unrecognized variable: "name")


Reproducible: Always

Steps to Reproduce:
1. Create an empty acceleo project
2. Create a simple ecore file with one top level class named AcceleoBug.
3. Create a new mtl generator file, select the newly created ecore file.

Note that the line in the template file that reads:
[file (a.name, false, 'UTF-8')]

has an error (unrecognized variable: "name")
Comment 1 Stephane Begaudeau CLA 2011-04-13 04:28:02 EDT
Created attachment 193125 [details]
Dynamic metamodel example

Screenshot of a generation based on a dynamic metamodel.
Comment 2 Stephane Begaudeau CLA 2011-04-13 04:38:51 EDT
Hi,

This will of course only work if the AcceleoBug class has a feature named "name". By default, we are generating an Acceleo module with the name of the object as the name of the generated file. Anyway, a critical bug still prevented Acceleo to handle correctly dynamic metamodels and a fix has been contributed on HEAD to handle this problem. The fix will be available in Acceleo 3.1M7 next month.


Since we know that some of our users love to live on the bleeding edge, a build is available here: https://hudson.eclipse.org/hudson/view/Modeling/job/m2t-acceleo-3.1/138/

It contains the latest fixes, including this one, but as any nightly build it is NOT production ready.

Stephane Begaudeau
Comment 3 radwane Mising name CLA 2011-05-03 10:59:48 EDT
Comment on attachment 193125 [details]
Dynamic metamodel example

can i run generate.mtl with acceleoBug.xmi???thx!!