Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Michal K on May 21, 2013, 11:01:27 pm
-
Hi,
Is there a possibility to generate code for multiple classes in a single file - similar to how XSD schema is generated.
We need to generate OData EDM descriptor from our class model.
Thanks,
Michal
-
You can't unless you define a stereotype for a pseudo package class element that contains the classes you want to generate code for as nested elements. If you do so, you can provide code generation templates that write just one file for your pseudo package class.
HTH
Günther
-
When I specify the filename attribute to be the same, all the classes are generated into the same file. However, I'm using C++ so perhaps the built-in behavior of the generator is different from language to language.
-
You can't unless you define a stereotype for a pseudo package class element that contains the classes you want to generate code for as nested elements. If you do so, you can provide code generation templates that write just one file for your pseudo package class.
That's what I've done. Thank you.
Michal
-
If you're using a custom language, use the generate package source code dialog after setting all filenames to the same value.