Sparx Systems Forum
Enterprise Architect => General Board => Topic started by: José Farinha on September 02, 2020, 09:06:49 am
-
I’m trying to leverage a Java-targeted model I have to generate HTML forms from some classes. For that I added HTML as a new language to the Code Template Editor, created the templates I needed and after changing the ‘language’ of those classes to HTML I manage to have the HTML code I wanted.
The problem is that the code is still being generated into .java files. I have to change their extension to .html every time I regenerate them.
Does anyone know how to get an .html extension? I can't find a way.
Is it that every class gets intrinsically tied to a target language ever since they are created, which determines the file extension? Do I need to generate a new model targeted to HTML?
Thanks for your attention.
José
-
You need to create an MDG technology with a Code Module (https://www.sparxsystems.com/enterprise_architect_user_guide/15.2/modeling/addingcodemodulesinmdgtec.html).
You can also reset the code language (https://www.sparxsystems.com/enterprise_architect_user_guide/15.2/model_domains/resetoptions.html) for an entire package.
-
Thanks, Eve.
Following your second pointer I manage to solve the problem by clearing the filenames.
Best regards