Customization of code generation produced by studio

Hello,

after i used standard screen generation a lot, i thought of the idea if it would be possible to customize the generated code a little. One example that came to my mind is that if you have a 1:N or M:N relationship in a domain type and want to generate the mapping table in the detail view of the domain type, then by default it creates the table under the field group for every relation. At least for me, i would like to see all relationship tables “grouped” in a tabsheet that sits under the field group.

Another example that i could imagine is, that in the main menu the localization of the domain types is Entity Name with an “s” at the end. Although this seems to work in almost every case in the english language, in other language is does not make much sense.

A third thing that i could imagine is, that someone would like to change the default behavior for opening the editor from “SAME-TAB” to “DIALOG” or something like this.

What i would like to know is, if there are any extension points that allow the users to change the generation behavior of the brilliant studio tool.

Have a nice day!

Hello Patrick,

Almost all code generation in Studio is based on Groovy SimpleTemplateEngine. Templates are located in the templates directory under your Studio installation folder, and you can edit them as you want. Just be careful when upgrading to a new version - you will have to apply your changes again.

The standard screen templates are located in templates\sd\standardScreens.

By the way, the new Studio, which will be released next week, will support a lot of parameters for the screens generation, as well as the ability to create a single combined browser+editor screen.

As for adding “s” to menu items - it is done for default locale, and it is hardcoded now. We’ll think how to handle this issue, thanks for the hint.