[ http://jira.andromda.org/browse/TEMPENG-3?page=comments#action_12030 ] Olaf Muliawan commented on TEMPENG-3: -------------------------------------
I have managed to: - add macro libraries - evaluate expressions. I've attached two files: the updated FreeMarkerTemplateEngine and a test that evaluates an expression FreeMarkerTemplateEngineTest. I don't have any experience in merging templates but will compare with the VelocityTemplateEngine implementation and take some more time to search for a solution. > 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