Author: tfennelly
Date: 2009-11-27 10:10:44 -0500 (Fri, 27 Nov 2009)
New Revision: 18883
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/model/freemarker/FreemarkerCSVContentGenerator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/model/freemarker/FreemarkerCSVNodeGraphicalModel.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5281
Extra whitespace being added around freemarker templates
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/model/freemarker/FreemarkerCSVContentGenerator.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/model/freemarker/FreemarkerCSVContentGenerator.java 2009-11-27
14:52:00 UTC (rev 18882)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/model/freemarker/FreemarkerCSVContentGenerator.java 2009-11-27
15:10:44 UTC (rev 18883)
@@ -15,8 +15,8 @@
import java.util.List;
import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.jboss.template.csv.CSVFreeMarkerTemplateBuilder;
import org.jboss.template.csv.CSVModelBuilder;
-import org.jboss.template.csv.CSVToFreemarkerTemplateBuilder;
import org.jboss.template.exception.InvalidMappingException;
import org.jboss.template.exception.TemplateBuilderException;
import org.jboss.tools.smooks.configuration.editors.IXMLStructuredObject;
@@ -95,9 +95,9 @@
CSVModelBuilder modelBuilder = new CSVModelBuilder(fieldsName.toArray(new String[]
{}));
Document model = modelBuilder.buildModel();
- CSVToFreemarkerTemplateBuilder builder;
+ CSVFreeMarkerTemplateBuilder builder;
- builder = new CSVToFreemarkerTemplateBuilder(model, sperator, quote);
+ builder = new CSVFreeMarkerTemplateBuilder(model, sperator, quote);
List<TreeNodeConnection> connections =
csvRecordGraphicalModel.getTargetConnections();
if (!connections.isEmpty() && connections.size() == 1) {
@@ -129,7 +129,7 @@
return builder.buildTemplate();
}
- protected void addValueMapping(CSVToFreemarkerTemplateBuilder builder,
FreemarkerCSVNodeGraphicalModel filedNode,
+ protected void addValueMapping(CSVFreeMarkerTemplateBuilder builder,
FreemarkerCSVNodeGraphicalModel filedNode,
Document model, String recordName, JavaBeanGraphModel recordRootNode) throws
InvalidMappingException {
CSVNodeModel csvFieldNode = (CSVNodeModel) filedNode.getData();
String elementName = csvFieldNode.getName();
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/model/freemarker/FreemarkerCSVNodeGraphicalModel.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/model/freemarker/FreemarkerCSVNodeGraphicalModel.java 2009-11-27
14:52:00 UTC (rev 18882)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/model/freemarker/FreemarkerCSVNodeGraphicalModel.java 2009-11-27
15:10:44 UTC (rev 18883)
@@ -174,17 +174,7 @@
if (this.domainProvider instanceof ISmooksModelProvider) {
version = ((ISmooksModelProvider) domainProvider).getPlatformVersion();
}
- // if (content != null) {
- if (SmooksConstants.VERSION_1_1.equals(version)) {
- // CDATA
- SmooksModelUtils.setCDATAToSmooksType(domainProvider.getEditingDomain(), template,
content);
- }
-
- if (SmooksConstants.VERSION_1_2.equals(version)) {
- // Comment
- SmooksModelUtils.setCommentToSmooksType(domainProvider.getEditingDomain(), template,
content);
- }
- // }
+ SmooksModelUtils.setCDATAToSmooksType(domainProvider.getEditingDomain(), template,
content);
}
/*