Hi folks,
I am using AndroMDA 3.0 to generate Java code using custom templates. My model was originally developed by a third party, but I have modified it extensively, and the modifications were done in MagicDraw 8.0.
The model contains UML enumerations. I need to bind these to an "Enumeration.vsl" template that generates a Java 5 "enum" construct.
My problem is that I cannot seem to successfully bind Enumeration.vsl to the instances of UML enumerations. Here is what I have tried --
<template path="templates/java/Enumeration.vsl">
<modelElements variable="class">
<modelElement>
<type name="o.a.m.uml.ClassifierFacade">
<property name="enumeration">true</property>
</type>
</modelElement>
</modelElements>
</template>Nothing gets bound to Enumeration.vsl. So I tried the following --
<template path="templates/java/Enumeration.vsl">
<modelElements variable="class">
<modelElement>
<type name="o.a.m.uml.EnumerationFacade"/>
</modelElement>
</modelElements>
</template>but encountered the same problem. Finally, just to see if this would help, I created an <<enumeration>> stereotype, attached it all the enumerations in my UML model, and did --
<template path="templates/java/Enumeration.vsl">
<modelElements variable="class">
<modelElement stereotype="enumeration"/>
</modelElements>
</template>and this *did* succeed in invoking Enumeration.vsl for the correct UML model elements. However, in my template, ${class.literals} evaluates as empty, which leads me to wonder if an EnumerationFacade has indeed been constructed, or if a generic ClassifierFacade was constructed instead.
Thanks a lot in advance for any assistance. Peace,
Ihab
-- Ihab A.B. Awad <[EMAIL PROTECTED]> Snr Scientific Programmer, Dept of Genetics
------------------------------------------------------- This SF.Net email is sponsored by Oracle Space Sweepstakes Want to be the first software developer in space? Enter now for the Oracle Space Sweepstakes! http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click _______________________________________________ Andromda-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/andromda-user
