I'm using Torque via the classpath and think it's handier than having a
single installation and especially having all the templates in the
project folder. However, I'd like to add my own functionality to some of
the generated code.

A single, machine-wide installation would allow a clean source tree and
also for customization to occur in the templates, but then those
customizations would occur for any project on the machine that used that
installation, which of course isn't desirable.

So, what if the templates could have conditional includes? E.g. you
could set a property:

torque.include.object = src/myadditions.vm
torque.include.peer = src/myadditions2.vm

Then at the end of Object.vm/Peer.vm, it'd check the corresponding
torque.include.object/torque.include.peer property to see if it should
execute another template in the given context.

Both the classpath or machine-wide installation could take advantage of
this approach. Looking at the current project I'm working on, I'd really
like the template customization ability but am too stubborn to unzip
torque into my source tree.

Does this sound like a good idea? I'd be glad to put the functionality
together, but would like to get an okay first. Not a guarantee that it'd
be committed, of course, but just that I'm not wasting my time or
missing a different, better approach.

Thanks,
Stephen





--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to