[ http://jira.andromda.org/browse/TEMPENG-3?page=comments#action_12019 ] Chad Brandon commented on TEMPENG-3: ------------------------------------
Thanks Olaf, I added your fixes, as you can see from the rest of the implementation, a couple things aren't implemented: * adding a macrolibrary * setting a merge location (for merging) * getting an evaluted expression as a string (for allowing the file name to be created from a template variable). Would you want to implement those on the FreeMarkerTemplateEngine implementation and provide a patch? I'd glady apply it. Thanks again! > FreeMarker Template Engine does not work. > ----------------------------------------- > > Key: TEMPENG-3 > URL: http://jira.andromda.org/browse/TEMPENG-3 > Project: Template Engines > Type: Improvement > Environment: AndroMDA 3.1 > Reporter: Olaf Muliawan > Assignee: Chad Brandon > > The current implementation of FreeMarker Template Engine is not fully > functional. The solution lies in configuration of FreeMarker in the method > processTemplate(...): > if (this.configuration == null) > { > this.configuration = new Configuration(); > Class mainClass = org.andromda.ant.task.AndroMDAGenTask.class; > > // Tell FreeMarker it should use the classpath when searching for > templates > configuration.setClassForTemplateLoading(mainClass, "/"); > // use Bean Wrapper, in order to get maximal reflection > capabilities > configuration.setObjectWrapper(ObjectWrapper.BEANS_WRAPPER); > } ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf