That's an option. Or, since Velocity is open source, you could always hack on it. Whichever works best for you. :)
Best luck with it! On Fri, Nov 6, 2015 at 4:16 AM, Paul Wellner Bou <p...@wellnerbou.de> wrote: > Thanks, Nathan, > > yes, thats useful, this way I get all variables used, at least. > Unfortunately I don't find a way to intercept something like > #set($var="whatever"). So I assume I will have to parse the vm file > manually searching for #set occurrences? > > Kind regards > Paul Wellner Bou > > On Thu, Nov 5, 2015 at 8:57 PM, Nathan Bubna <nbu...@gmail.com> wrote: > > > You could configure a NullSetEventHandler to catch when the RHS is null. > > But i'm afraid the #set directive is deeply embedded, without a lot of > > hooks, much like #if. But perhaps one of the other available > EventHandler > > interfaces can help? > > > > > > > https://velocity.apache.org/engine/releases/velocity-1.7/apidocs/org/apache/velocity/app/event/EventHandler.html > > > > > http://velocity.apache.org/engine/devel/developer-guide.html#Configuring_Event_Handlers > > > > On Thu, Nov 5, 2015 at 2:27 AM, Paul Wellner Bou <p...@wellnerbou.de> > > wrote: > > > > > Hello, > > > > > > i am trying to write something analyzing our velocity file hell > > > automatically, showing direct (via #parse) or indirect (via declared > > > variables, #set) between vm files. > > > > > > I found a way to intercept the #parse directive ( > > > https://gist.github.com/paulwellnerbou/b0e53e7a045e8e90a840). Is this > > > possible with the #set directive as well? > > > > > > Thank you and best regards > > > Paul Wellner Bou > > > > > >