Re: Intercepting #set
Nathan Bubna <[email protected]> Thu, 5 Nov 2015 11:57:33 -0800
| Newsgroups | gmane.comp.jakarta.velocity.user |
|---|---|
| Message-ID | <CAFyaDjHvSQwPCdNTFHf047ZVqCfQvj3m89aZkk1+gwye9zJm8g@mail.gmail.com> |
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 <[email protected]> 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 >