It's kind of hard to review that patch because your editor seems to have changed spaces to tabs, so every line looks like a new line. Can you turn off that "tabify" behavior and create a new patch?
- Dave On Wed, Jan 4, 2012 at 3:48 AM, Greg Huber <gregh3...@gmail.com> wrote: > Dave, > > Here is a patch to get the macros to reload from the WEB-INF directory > (#parse(..)). The normal way velocity does reloading not apply for > roller as the themes are stored in the > SharedThemeFormDirectory/WebsiteCustomTheme format and there is no > available mechanism for velocity to reload roller, even if we could > somehow workout if one file changed. > > (See velocity tools WebappResourceLoader.java for inspiration) > > ## > > To get it to work, disable caching >> > webapp.resource.loader.cache=false, and set >> > velocimacro.library.autoreload=true. > > velocity.properties > # for the loader we call 'webapp', use the WebappResourceLoader > webapp.resource.loader.description=Webapp Resource Loader > > webapp.resource.loader.class=org.events.ui.rendering.velocity.WebappResourceLoader > #webapp.resource.loader.cache=true > webapp.resource.loader.cache=false > > webapp.resource.loader.path=/WEB-INF/velocity,/WEB-INF/velocity/templates,/WEB-INF/velocity/templates/feeds,templates/weblog,templates/planet > webapp.resource.loader.modificationCheckInterval=2 > > # Change to false for deployment environments. > # Caching for the 'class' & 'webapp' ResourceLoaders must be false for > this to work > #velocimacro.library.autoreload=false > velocimacro.library.autoreload=true > > ## > > Its driven from modifying the weblog theme, eg, change > WEB-INF/velocity/weblog.vm, then trigger the update by changing the > themes/basic/weblog.vm template (with theme reloading on, and logged > in!). > > ## > > Java mods to get it to work: > > Remove any paths from templates .vm called from the code and add them > to the velocity properties webapp.resource.loader.path. > > searched on: templates/ > > ## > > We could also change the order: > > resource.loader = webapp, theme, roller, class > to > resource.loader = theme, roller, webapp, class > > Which would reduce some checking. > > ## > > Planet stuff, I have tried to do the required, but have not tested, as > do not have planet setup/running. > > ## > > Should make the mobile theme dev a bit easier! > > Cheers Greg > -- Dave M. Johnson Apache Roller PMC Chair http://rollerweblogger.org/roller