db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From T E Schmitz <mail...@numerixtechnology.de>
Subject Re: help with torque generator
Date Thu, 28 Oct 2004 11:07:31 GMT
Hello Eduardo,

> From the torque.jar file, it's possible to see that the generator uses
> vm files to create the external documents. What exact format are those
> vm files in? Is there any documentation on how I can extend, or create a
> new vm file?

They are Velocity files (http://jakarta.apache.org/velocity)
Yes, you can add more vm templates to your project.

What makes life easier when editing the Velocity/Java jumble: I use an 
editor (on the PC) called UltraEdit, for which I have a code colouring 
for Velocity files.

> Is there anyway to have those vm files outside the torque package? I
> tried copying some of the files to my project, so that I can then change
> them, and I changed the torque-build.xml file, but I couldn't get it to
> work (Resource not found - control.vm file).

Yes, I've done it. You have to change the torque-build.xml. You also 
have to understand how the Torque people used Control.vm: this is the 
template from which the generation of the actual code is controlled. 
Control.vm, as it is, expects the other vm files to be in the same 
directory.
The other thing you have to be aware of is that the schema.xml file is 
expected in a certain location (generator\schema); in my Ant build I 
copy my schema file from the project directory to this Torque directory.

You could also make the Torque generator directory tree part of your 
project.

I am generating a whole lot of additional code based on the schema file. 
I found it was really worth my while understanding the Velocity templates.

-- 


Regards/Gruß,

Tarlika Elisabeth Schmitz

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message