cobigen
cobigen copied to clipboard
Enable parametrization of generation over programming API
We should discuss a nice way to parametrize the generation with user defined values at generation time (not at context configuraiton specification time). One example might be the generation of a new component skeleton, while the component name should be defined by the user dynamically just before generation.
To equally support the maven as well as the eclipse plug-in for such parametrization, we should declare such user-dependent parametrization as parameter within triggers. I would propose the following new adjustment in the context configuration:
<contextConfiguration>
<triggers>
<trigger ...>
<parameter name="componentName" required="true"/>
...
</trigger>
</triggers>
</contextConfiguration>
-
required
should be optional but defaulttrue
- Is there any use case to have a
default
value declaration as attribute also? - it might be interesting to test, whether we also need a type declaration of the parameter value to be expected. As far as I currently know this is not necessary as FreeMarker tries to interprete all Strings according to their expected type in an expression. But this has to be verified as I did found any explicit description of the in the official documentation of FreeMarker.
This issue will also fix #72 as we then might be able to provide the generation target package by configuration.
Precondition for: #106 and #107
Before implementing this issue, we should have a small discussion about possible cobigen-core framework extensions to find the best hopefully backward compatible solution.
Stale topic. Please negotiate closing or discussing the relevance of this ticket.