Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 337011 - Acceleo with dynamic models appears to be broken
Summary: Acceleo with dynamic models appears to be broken
Status: CLOSED FIXED
Alias: None
Product: Acceleo
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 blocker
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-11 17:28 EST by Glenview Jeff CLA
Modified: 2011-05-03 10:59 EDT (History)
2 users (show)

See Also:


Attachments
Dynamic metamodel example (113.26 KB, image/png)
2011-04-13 04:28 EDT, Stephane Begaudeau CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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!!