You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sparx-enterprise-archite...@googlegroups.com
Hello,
I have started to create my own C Language dialect for Code generation by copying the template from the built-in C language in the Code Template Editor. I've modified the templates just a bit to verify that the generated code for the *.c and *.h-files is now really coming from my templates. This part is working. :)
As known, the generation of code-files starts with the classes found directly below a selected package.
My understanding is that the initial/root-templates are "File" and "File Impl" and that "File" would usually generate the *.h file and "File Impl" would generate the *.c file. For the built-in languages, then menu -> Tools -> Options -> Source Code Engineering provides a way to customize the file extensions for "File" and "File Impl".
However, I don't understand how I can tell the code generator which file-extension to create for custom languages, as they do not appear in the menu mentioned above. I've looked in the EA help files and in the forum, but wasn't successful. With my C dialect, EA first generated both *.c and *.h files, then after some editing only the *.h file and after some other changes it generates a file named according to the class name, but without any file-extension. I'm unaware that my editing was influencing the file extension, but deducing from the changed behaviour, there must be a way to tell EA which files and file-extensions to generate for the initial template in invokes.
Is it also possible to configure EA to generate additional files from the initial class, e.g. "%fileName%.xyz" and invoke a custom root template to generate it's contents or are the root templates "File" and "File Impl" hardcoded in EA?