Re: refactoring the velocity templates

hussayn <[email protected]> Tue, 13 Jan 2009 04:06:10 -0800 (PST)
Newsgroups gmane.comp.java.scarab.devel
Message-ID <[email protected]>
Let me first thank you for your hints. And explain my motivation
by looking at the velocity templates and ask 3 "everyday questions":

1.) "is this variable defined somewhere in this template, or somewhere 
     in the velocity files up the velovity call stack or is it injected 
     from the calling java instance?"

2.) "is this macro only local or is it used from other places?"

     Citation from ronnie: 
    
     "Local macros are the ones defined it the current template. 
      Global macros are the macros defined in the macro-templates. 
      Why do we need a prefix to indicate this?"
     
     is this forced by velocity, or is this a Scarab convention? 

3.) "Is this method in my java class simply obsolete, or is it still
referenced
     by a velocity template, and if so from where exactly?"

I can find answers to these questions, but it is a tedious an inefficient
process.
I had in mind to make this process easier with the name convention idea in 2
ways:

1.) If a checker tool can be created, which gives me a clean cross
references,
     i can answer the questions above by looking at the cross reference. 
    And thus i can work faster and cleaner on refactoring.

2.) If an automated converter tool can be created, that applies the name
conventions
     in a reliable way, i would be able to answer each question above
immediately by
     looking at the template code. I wouldnt need the cross reference then.

Having said this, i meanwhile think, that an automated converter is close to
impossible
due to several issues (starting with name ambiguities, complex calls, ...)
But maybe a cross reference tool for velocity is something doable. Although
i havent found
anything on the net... But to be honest, i fear that everything is so
intertwinned, that
any refactoring effort will become a hard and tedious task anyways...

i am clueless now.
-- 
View this message in context: http://www.nabble.com/refactoring-the-velocity-templates-tp21421588p21434415.html
Sent from the Scarab - Dev mailing list archive at Nabble.com.

------------------------------------------------------
http://scarab.tigris.org/ds/viewMessage.do?dsForumId=455&dsMessageId=1021743

To unsubscribe from this discussion, e-mail: [[email protected]].