Title: 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>>

Attachment: templateTool.jar
Description: Binary data

Reply via email to