Author: tfennelly
Date: 2009-11-27 11:22:04 -0500 (Fri, 27 Nov 2009)
New Revision: 18887
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/SmooksFreemarkerTemplateGraphicalEditor.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5271
Apply Template bindings not saved in Smooks Config XML
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/SmooksFreemarkerTemplateGraphicalEditor.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/SmooksFreemarkerTemplateGraphicalEditor.java 2009-11-27
16:21:19 UTC (rev 18886)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/SmooksFreemarkerTemplateGraphicalEditor.java 2009-11-27
16:22:04 UTC (rev 18887)
@@ -377,14 +377,13 @@
char quote = SmooksModelUtils.getFreemarkerCSVQuote(freemarker);
String[] fields = SmooksModelUtils.getFreemarkerCSVFileds(freemarker);
try {
- if (SmooksConstants.VERSION_1_2.equals(smooksModelProvider.getPlatformVersion())) {
- contents = SmooksModelUtils.getAnyTypeComment(template);
+ if(contents != null) {
+ CSVModelBuilder modelBuilder = new CSVModelBuilder(fields);
+ Document model = modelBuilder.buildModel();
+ TemplateBuilder builder = new CSVFreeMarkerTemplateBuilder(model, seprator, quote,
contents);
+ List<Mapping> mappings = builder.getMappings();
+ mappingList.addAll(mappings);
}
- CSVModelBuilder modelBuilder = new CSVModelBuilder(fields);
- Document model = modelBuilder.buildModel();
- TemplateBuilder builder = new CSVFreeMarkerTemplateBuilder(model, seprator, quote,
contents);
- List<Mapping> mappings = builder.getMappings();
- mappingList.addAll(mappings);
} catch (Exception e) {
e.printStackTrace();
}