Bug 333455 - [ATL] toString = programmatic behavior not coherent with usual behavior
Summary: [ATL] toString = programmatic behavior not coherent with usual behavior
Status: NEW
Alias: None
Product: MMT.ATL
Classification: Modeling
Component: emfvm (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: mmt-atl.toolkit-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-04 05:22 EST by Gabriel BARBIER CLA
Modified: 2012-03-19 12:19 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gabriel BARBIER CLA 2011-01-04 05:22:47 EST
Hello,

Using the emf-vm, and using the toString method on an EMF enumeration, I have a different behavior depending on the way I launch the transformation.

To be able to return a specific String, I have manually modified the toString method of my enumeration (to return a literal value and not the name).
When I launch the transformation using a configuration, it works as expected.
When I launch the transformation in a programmatic way, the toString method returns the value of "name" attribute.

Regards
Gabriel

PS: using the "old" regular vm, it works as expected in both cases.
Comment 1 William Piers CLA 2012-03-19 12:19:01 EDT
The difference of behaviour may come from the way you load the metamodel. ATL is able to load a metamodel from a single ecore file, but that will bypass the EMF implementation of the metamodel if present (and the associated redefined toString  method).
Could you please check that you load the metamodel from the EMF Registry (using its uri) in your programmatic launch code ?