Title: lil' tool to help w/ template refactoring

This is cool stuff! As soon as the webwork-ext project is created lets make sure this kind of stuff is added in there. Great work!

 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
Sent: Monday, November 03, 2003 10:33 AM
To: [EMAIL PROTECTED]
Subject: [OS-webwork] lil' tool to help w/ template refactoring

 

Hi folks!

I've been badly burned by a change in our domain model, and unfortunately I found out that refactoring a domain model after coding tons of velocity templates with forms that change the objects directly using a Model-Driven action is just nasty.

So I just put up a *very* simple app that parses the velocity templates, looks for #tag's and #bodytag's and tries to evaluate the OGNL expressions given as parameters. The code is not elegant or pretty by any stretch of imagination, but it's working well for me so far, and I would really appreciate some feedback. If this tool is generally useful, I'll consider reimplementing most parts of it, and maybe integrate it with the VeloEdit plug-in for Eclipse, which could even bring some automatic refactoring support to OGNL expressions (now *that* would be cool! :)

Usage:

java -jar templateTool.jar /path/to/my/file.vm

java -jar templateTool.jar /path/to/my/files/*.vm

or:

java templatetool.TemplateTool /path/to/my/file.vm

java templatetool.TemplateTool /path/to/my/files/*.vm

You need the Velocity and OGNL libs in your classpath for the TemplateTool to work. Hope you enjoy it!

Peace,
-cv

<<templateTool.jar>>

Reply via email to