Author: tfennelly
Date: 2010-02-04 10:18:54 -0500 (Thu, 04 Feb 2010)
New Revision: 20128
Removed:
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/Messages.java
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/messages.properties
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/Messages.java
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/messages.properties
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/Messages.java
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/csv/Messages.java
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/csv/messages.properties
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/exception/Messages.java
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/exception/messages.properties
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/messages.properties
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/util/Messages.java
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/util/messages.properties
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/xml/Messages.java
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/xml/messages.properties
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/ModelBuilder.java
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/ModelNodeResolver.java
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/XMLSampleModelBuilder.java
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/XSDModelBuilder.java
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/TemplateBuilder.java
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/ValueMapping.java
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/csv/CSVFreeMarkerTemplateBuilder.java
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/exception/UnmappedCollectionNodeException.java
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/util/FreeMarkerUtil.java
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/xml/XMLFreeMarkerTemplateBuilder.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5773
Externalize strings in org.jboss.tools.smooks.templating
Rolling back r20126 and r20118
Deleted:
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/Messages.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/Messages.java 2010-02-04
15:17:43 UTC (rev 20127)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/Messages.java 2010-02-04
15:18:54 UTC (rev 20128)
@@ -1,44 +0,0 @@
-/**
- * JBoss, Home of Professional Open Source
- * Copyright 2009, JBoss Inc., and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2009, JBoss Inc.
- */
-package org.jboss.tools.smooks.templating.model;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- *
- *
- * @author <a
href="mailto:tom.fennelly@jboss.com">tom.fennelly@jboss.com</a>
- */
-public class Messages extends NLS {
- private static final String BUNDLE_NAME =
"org.jboss.tools.smooks.templating.model.messages"; //$NON-NLS-1$
- public static String ModelBuilder_0;
- public static String ModelBuilder_1;
- public static String ModelNodeResolver_0;
- public static String ModelNodeResolver_1;
- public static String ModelNodeResolver_2;
- public static String ModelNodeResolver_3;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/ModelBuilder.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/ModelBuilder.java 2010-02-04
15:17:43 UTC (rev 20127)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/ModelBuilder.java 2010-02-04
15:18:54 UTC (rev 20128)
@@ -179,7 +179,7 @@
public static int getMinOccurs(Element element) {
String minOccurs = element.getAttributeNS(NAMESPACE, "minOccurs");
//$NON-NLS-1$
- if(minOccurs.equals(Messages.ModelBuilder_0)) {
+ if(minOccurs.equals("")) {
return 1;
}
@@ -189,7 +189,7 @@
public static int getMaxOccurs(Element element) {
String maxOccurs = element.getAttributeNS(NAMESPACE, "maxOccurs");
//$NON-NLS-1$
- if(maxOccurs.equals(Messages.ModelBuilder_1)) {
+ if(maxOccurs.equals("")) {
return 1;
}
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/ModelNodeResolver.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/ModelNodeResolver.java 2010-02-04
15:17:43 UTC (rev 20127)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/ModelNodeResolver.java 2010-02-04
15:18:54 UTC (rev 20128)
@@ -43,7 +43,7 @@
private Map<String, String> prefixMap = new HashMap<String, String>();
public ModelNodeResolver(Document model) {
- buildModelNodeMap(model.getDocumentElement(), Messages.ModelNodeResolver_0);
+ buildModelNodeMap(model.getDocumentElement(), "");
}
public Node resolveNodeMapping(Node node) {
@@ -62,7 +62,7 @@
String nodeNS = node.getNamespaceURI();
if(nodeNS != null && nodeNS.length() > 0) {
if(node.getNodeType() == Node.ATTRIBUTE_NODE) {
- pathBuilder.insert(0, "@" + getPrefix(nodeNS) +
Messages.ModelNodeResolver_1 + ((Attr)node).getName()); //$NON-NLS-1$
+ pathBuilder.insert(0, "@" + getPrefix(nodeNS) + ":" +
((Attr)node).getName()); //$NON-NLS-1$
} else {
pathBuilder.insert(0, getPrefix(nodeNS) + ":" +
DomUtils.getName((Element) node)); //$NON-NLS-1$
}
@@ -89,7 +89,7 @@
String elNS = element.getNamespaceURI();
if(parentPath.length() > 0) {
- parentPath += Messages.ModelNodeResolver_2;
+ parentPath += "/";
}
if(elNS != null && elNS.length() > 0) {
@@ -107,7 +107,7 @@
if(!ModelBuilder.isInReservedNamespace(attribute)) {
String attrNS = attribute.getNamespaceURI();
if(attrNS != null && attrNS.length() > 0) {
- modelNodeMap.put(elementPath + "/@" + getPrefix(attrNS) +
Messages.ModelNodeResolver_3 + attribute.getName(), attribute); //$NON-NLS-1$
+ modelNodeMap.put(elementPath + "/@" + getPrefix(attrNS) + ":" +
attribute.getName(), attribute); //$NON-NLS-1$
} else {
modelNodeMap.put(elementPath + "/@" + attribute.getName(), attribute);
//$NON-NLS-1$
}
Deleted:
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/messages.properties
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/messages.properties 2010-02-04
15:17:43 UTC (rev 20127)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/messages.properties 2010-02-04
15:18:54 UTC (rev 20128)
@@ -1,6 +0,0 @@
-ModelBuilder_0=
-ModelBuilder_1=
-ModelNodeResolver_0=
-ModelNodeResolver_1=:
-ModelNodeResolver_2=/
-ModelNodeResolver_3=:
Deleted:
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/Messages.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/Messages.java 2010-02-04
15:17:43 UTC (rev 20127)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/Messages.java 2010-02-04
15:18:54 UTC (rev 20128)
@@ -1,52 +0,0 @@
-/**
- * JBoss, Home of Professional Open Source
- * Copyright 2009, JBoss Inc., and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2009, JBoss Inc.
- */
-package org.jboss.tools.smooks.templating.model.xml;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- *
- *
- * @author <a
href="mailto:tom.fennelly@jboss.com">tom.fennelly@jboss.com</a>
- */
-public class Messages extends NLS {
- private static final String BUNDLE_NAME =
"org.jboss.tools.smooks.templating.model.xml.messages"; //$NON-NLS-1$
- public static String XMLSampleModelBuilder_0;
- public static String XMLSampleModelBuilder_1;
- public static String XMLSampleModelBuilder_2;
- public static String XMLSampleModelBuilder_3;
- public static String XMLSampleModelBuilder_4;
- public static String XMLSampleModelBuilder_5;
- public static String XMLSampleModelBuilder_6;
- public static String XSDModelBuilder_0;
- public static String XSDModelBuilder_1;
- public static String XSDModelBuilder_2;
- public static String XSDModelBuilder_3;
- public static String XSDModelBuilder_4;
- public static String XSDModelBuilder_5;
- public static String XSDModelBuilder_6;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/XMLSampleModelBuilder.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/XMLSampleModelBuilder.java 2010-02-04
15:17:43 UTC (rev 20127)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/XMLSampleModelBuilder.java 2010-02-04
15:18:54 UTC (rev 20128)
@@ -61,19 +61,19 @@
try {
docBuilder = docBuilderFactory.newDocumentBuilder();
} catch (ParserConfigurationException e) {
- throw new RuntimeException(Messages.XMLSampleModelBuilder_0, e);
+ throw new RuntimeException("Unexpectd XML exception. Unable to create
DocumentBuilder instance.", e);
}
}
public XMLSampleModelBuilder(URI xmlSampleURI) throws IOException,
ModelBuilderException {
- Assert.isNotNull(xmlSampleURI, Messages.XMLSampleModelBuilder_1);
+ Assert.isNotNull(xmlSampleURI, "Null 'xmlSampleURI' arg in method
call.");
File xmlSampleFile = new File(xmlSampleURI.toFileString());
if(!xmlSampleFile.exists()) {
- throw new IOException("XML Sample '" +
xmlSampleFile.getAbsolutePath() + Messages.XMLSampleModelBuilder_2); //$NON-NLS-1$
+ throw new IOException("XML Sample '" +
xmlSampleFile.getAbsolutePath() + "' not found."); //$NON-NLS-1$
} else if(!xmlSampleFile.isFile()) {
- throw new IOException("XML Sample '" +
xmlSampleFile.getAbsolutePath() + Messages.XMLSampleModelBuilder_3); //$NON-NLS-1$
+ throw new IOException("XML Sample '" +
xmlSampleFile.getAbsolutePath() + "' is not a normal file. Might be a directory
etc."); //$NON-NLS-1$
}
try {
@@ -123,7 +123,7 @@
if(child.getNodeType() == Node.ELEMENT_NODE) {
configureModelElementTypes((Element) child);
} else {
- throw new IllegalStateException(Messages.XMLSampleModelBuilder_4);
+ throw new IllegalStateException("The configureModelElementTypes method can only
be called after the model has been trimed of non-model Nodes. Call trimNonModelNodes()
before calling configureModelElementTypes().");
}
}
} else {
@@ -143,7 +143,7 @@
if(child.getNodeType() == Node.ELEMENT_NODE) {
Element childElement = (Element) child;
- String elementName = DomUtils.getName(childElement) +
Messages.XMLSampleModelBuilder_5 + childElement.getNamespaceURI(); // Yes, namespace can
be null, but that's OK.
+ String elementName = DomUtils.getName(childElement) + ":" +
childElement.getNamespaceURI(); // Yes, namespace can be null, but that's OK.
Element earlierOccurance = childElementByNames.get(elementName);
// Mark every element as being optional and possibly being multiple...
@@ -164,7 +164,7 @@
configureModelElementCardinality(childElement);
} else {
- throw new IllegalStateException(Messages.XMLSampleModelBuilder_6);
+ throw new IllegalStateException("The configureModelElementTypes method can only
be called after the model has been trimed of non-model Nodes. Call trimNonModelNodes()
before calling configureModelElementTypes().");
}
}
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/XSDModelBuilder.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/XSDModelBuilder.java 2010-02-04
15:17:43 UTC (rev 20127)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/XSDModelBuilder.java 2010-02-04
15:18:54 UTC (rev 20128)
@@ -85,7 +85,7 @@
XSDElementDeclaration rootElement = elements.get(rootElementName);
if(rootElement == null) {
- throw new IllegalArgumentException("Unknown root element '" +
rootElementName + Messages.XSDModelBuilder_0); //$NON-NLS-1$
+ throw new IllegalArgumentException("Unknown root element '" +
rootElementName + "'."); //$NON-NLS-1$
}
Document model = createModelInstance();
@@ -108,7 +108,7 @@
File schemaFile = new File(schemaPath);
if(!schemaFile.exists()) {
- throw new IOException("XSD '" + schemaFile.getAbsolutePath() +
Messages.XSDModelBuilder_1); //$NON-NLS-1$
+ throw new IOException("XSD '" + schemaFile.getAbsolutePath() +
"' not found."); //$NON-NLS-1$
}
xsdSources[i] = new StreamSource(new FileInputStream(schemaFile));
i++;
@@ -134,7 +134,7 @@
ResourceSet resourceSet = new ResourceSetImpl();
Resource resource;
- resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put(Messages.XSDModelBuilder_2,
new XSDResourceFactoryImpl());
+ resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put("xsd",
new XSDResourceFactoryImpl());
resource = resourceSet.getResource(schemaURI, true);
Map<String, Object> options = new HashMap<String, Object>();
@@ -143,7 +143,7 @@
resource.load(options);
if(resource.getContents().isEmpty()) {
- throw new ModelBuilderException("Failed to load schema '" +
schemaURI + Messages.XSDModelBuilder_3); //$NON-NLS-1$
+ throw new ModelBuilderException("Failed to load schema '" +
schemaURI + "'."); //$NON-NLS-1$
}
XSDSchema schema = (XSDSchema) resource.getContents().get(0);
@@ -230,7 +230,7 @@
private String getPrefix(String elementNS) {
String nsPrefix = nsPrefixes.getProperty(elementNS);
if(nsPrefix == null) {
- nsPrefix = Messages.XSDModelBuilder_4 + nsPrefixes.size();
+ nsPrefix = "ns" + nsPrefixes.size();
nsPrefixes.setProperty(elementNS, nsPrefix);
}
return nsPrefix;
@@ -296,13 +296,13 @@
XSDSimpleTypeDefinition typeDef = attributeDecl.getTypeDefinition();
String name = attributeDecl.getName();
String attributeNS = attributeDecl.getTargetNamespace();
- String value = Messages.XSDModelBuilder_5;
+ String value = "";
XSDAttributeUseCategory use = attributeUse.getUse();
if(use == XSDAttributeUseCategory.REQUIRED_LITERAL) {
value = REQUIRED;
} else if(attributeUse.getValue() != null) {
- value = OPTIONAL + Messages.XSDModelBuilder_6 +
attributeUse.getValue().toString();
+ value = OPTIONAL + "=" +
attributeUse.getValue().toString();
} else {
value = OPTIONAL;
}
Deleted:
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/messages.properties
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/messages.properties 2010-02-04
15:17:43 UTC (rev 20127)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/messages.properties 2010-02-04
15:18:54 UTC (rev 20128)
@@ -1,14 +0,0 @@
-XMLSampleModelBuilder_0=Unexpectd XML exception. Unable to create DocumentBuilder
instance.
-XMLSampleModelBuilder_1=Null 'xmlSampleURI' arg in method call.
-XMLSampleModelBuilder_2=' not found.
-XMLSampleModelBuilder_3=' is not a normal file. Might be a directory etc.
-XMLSampleModelBuilder_4=The configureModelElementTypes method can only be called after
the model has been trimed of non-model Nodes. Call trimNonModelNodes() before calling
configureModelElementTypes().
-XMLSampleModelBuilder_5=:
-XMLSampleModelBuilder_6=The configureModelElementTypes method can only be called after
the model has been trimed of non-model Nodes. Call trimNonModelNodes() before calling
configureModelElementTypes().
-XSDModelBuilder_0='.
-XSDModelBuilder_1=' not found.
-XSDModelBuilder_2=xsd
-XSDModelBuilder_3='.
-XSDModelBuilder_4=ns
-XSDModelBuilder_5=
-XSDModelBuilder_6==
Deleted:
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/Messages.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/Messages.java 2010-02-04
15:17:43 UTC (rev 20127)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/Messages.java 2010-02-04
15:18:54 UTC (rev 20128)
@@ -1,45 +0,0 @@
-/**
- * JBoss, Home of Professional Open Source
- * Copyright 2009, JBoss Inc., and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2009, JBoss Inc.
- */
-package org.jboss.tools.smooks.templating.template;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- *
- *
- * @author <a
href="mailto:tom.fennelly@jboss.com">tom.fennelly@jboss.com</a>
- */
-public class Messages extends NLS {
- private static final String BUNDLE_NAME =
"org.jboss.tools.smooks.templating.template.messages"; //$NON-NLS-1$
- public static String TemplateBuilder_0;
- public static String TemplateBuilder_1;
- public static String TemplateBuilder_2;
- public static String TemplateBuilder_3;
- public static String TemplateBuilder_4;
- public static String TemplateBuilder_5;
- public static String ValueMapping_0;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/TemplateBuilder.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/TemplateBuilder.java 2010-02-04
15:17:43 UTC (rev 20127)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/TemplateBuilder.java 2010-02-04
15:18:54 UTC (rev 20128)
@@ -266,11 +266,11 @@
}
if (ModelBuilder.NAMESPACE.equals(mappingNode.getNamespaceURI())) {
throw new InvalidMappingException(
- "Unsupported XML target node mapping. Cannot map to a reserved model node from
the '" + ModelBuilder.NAMESPACE + Messages.TemplateBuilder_0); //$NON-NLS-1$
+ "Unsupported XML target node mapping. Cannot map to a reserved model node from
the '" + ModelBuilder.NAMESPACE + "' namespace."); //$NON-NLS-1$
}
if (ModelBuilder.isHidden(mappingNode)) {
throw new InvalidMappingException(
- "Illegal XML target node mapping for node '" + mappingNode +
Messages.TemplateBuilder_1); //$NON-NLS-1$
+ "Illegal XML target node mapping for node '" + mappingNode +
"'. This node (or one of it's ancestors) is hidden."); //$NON-NLS-1$
}
}
@@ -414,7 +414,7 @@
}
throw new TemplateBuilderException(
- Messages.TemplateBuilder_2);
+ "Unexpected Exception. Invalid <smk:list> collection node. Has no child
elements!");
}
protected void addValueMapping(Node modelNode, ModelNodeResolver modelNodeResolver,
String dollarVariable) throws TemplateBuilderException, InvalidMappingException {
@@ -435,7 +435,7 @@
}
public static void writeListStart(StringWriter writer, String srcPath, String
collectionItemName) {
- writer.write("<smk:list smk:srcPath=\"" + srcPath +
Messages.TemplateBuilder_3 + collectionItemName + Messages.TemplateBuilder_4 +
ModelBuilder.NAMESPACE + Messages.TemplateBuilder_5); //$NON-NLS-1$
+ writer.write("<smk:list smk:srcPath=\"" + srcPath + "\"
smk:collectionItemName=\"" + collectionItemName + "\"
xmlns:smk=\"" + ModelBuilder.NAMESPACE + "\">");
//$NON-NLS-1$
}
public static void writeListEnd(StringWriter writer) {
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/ValueMapping.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/ValueMapping.java 2010-02-04
15:17:43 UTC (rev 20127)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/ValueMapping.java 2010-02-04
15:18:54 UTC (rev 20128)
@@ -30,7 +30,7 @@
*/
public class ValueMapping extends Mapping {
- public static final String RAW_FORMATING_KEY = ValueMapping.class.getName() +
Messages.ValueMapping_0;
+ public static final String RAW_FORMATING_KEY = ValueMapping.class.getName() +
"#RAW_FORMATING_KEY";
private Class<?> valueType;
private Properties encodeProperties;
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/csv/CSVFreeMarkerTemplateBuilder.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/csv/CSVFreeMarkerTemplateBuilder.java 2010-02-04
15:17:43 UTC (rev 20127)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/csv/CSVFreeMarkerTemplateBuilder.java 2010-02-04
15:18:54 UTC (rev 20128)
@@ -104,10 +104,10 @@
}
private TemplateElement findListNode(TemplateElement templateNode) throws
TemplateBuilderException {
- if(templateNode.getNodeName().equals(Messages.CSVFreeMarkerTemplateBuilder_0)) {
+ if(templateNode.getNodeName().equals("IteratorBlock")) {
String description = templateNode.getDescription();
if(!description.startsWith("list")) { //$NON-NLS-1$
- throw new TemplateBuilderException ("Unsupported CSV template IteratorBlock type
'" + description + Messages.CSVFreeMarkerTemplateBuilder_1); //$NON-NLS-1$
+ throw new TemplateBuilderException ("Unsupported CSV template IteratorBlock type
'" + description + "'. Currently only support 'list'
IteratorBlock nodes."); //$NON-NLS-1$
}
return templateNode;
} else {
@@ -196,7 +196,7 @@
template.append('\n');
}
- template.append("<#list " + collectionMapping.getSrcPath() +
Messages.CSVFreeMarkerTemplateBuilder_2 + collectionMapping.getCollectionItemName() +
Messages.CSVFreeMarkerTemplateBuilder_3); //$NON-NLS-1$
+ template.append("<#list " + collectionMapping.getSrcPath() +
" as " + collectionMapping.getCollectionItemName() + ">\n");
//$NON-NLS-1$
int fieldIndex = 0;
for(int i = 0; i < nodeList.getLength(); i++) {
Node node = nodeList.item(i);
Deleted:
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/csv/Messages.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/csv/Messages.java 2010-02-04
15:17:43 UTC (rev 20127)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/csv/Messages.java 2010-02-04
15:18:54 UTC (rev 20128)
@@ -1,42 +0,0 @@
-/**
- * JBoss, Home of Professional Open Source
- * Copyright 2009, JBoss Inc., and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2009, JBoss Inc.
- */
-package org.jboss.tools.smooks.templating.template.csv;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- *
- *
- * @author <a
href="mailto:tom.fennelly@jboss.com">tom.fennelly@jboss.com</a>
- */
-public class Messages extends NLS {
- private static final String BUNDLE_NAME =
"org.jboss.tools.smooks.templating.template.csv.messages"; //$NON-NLS-1$
- public static String CSVFreeMarkerTemplateBuilder_0;
- public static String CSVFreeMarkerTemplateBuilder_1;
- public static String CSVFreeMarkerTemplateBuilder_2;
- public static String CSVFreeMarkerTemplateBuilder_3;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
Deleted:
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/csv/messages.properties
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/csv/messages.properties 2010-02-04
15:17:43 UTC (rev 20127)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/csv/messages.properties 2010-02-04
15:18:54 UTC (rev 20128)
@@ -1,4 +0,0 @@
-CSVFreeMarkerTemplateBuilder_0=IteratorBlock
-CSVFreeMarkerTemplateBuilder_1='. Currently only support 'list'
IteratorBlock nodes.
-CSVFreeMarkerTemplateBuilder_2=\ as
-CSVFreeMarkerTemplateBuilder_3=>\n
Deleted:
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/exception/Messages.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/exception/Messages.java 2010-02-04
15:17:43 UTC (rev 20127)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/exception/Messages.java 2010-02-04
15:18:54 UTC (rev 20128)
@@ -1,39 +0,0 @@
-/**
- * JBoss, Home of Professional Open Source
- * Copyright 2009, JBoss Inc., and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2009, JBoss Inc.
- */
-package org.jboss.tools.smooks.templating.template.exception;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- *
- *
- * @author <a
href="mailto:tom.fennelly@jboss.com">tom.fennelly@jboss.com</a>
- */
-public class Messages extends NLS {
- private static final String BUNDLE_NAME =
"org.jboss.tools.smooks.templating.template.exception.messages"; //$NON-NLS-1$
- public static String UnmappedCollectionNodeException_0;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/exception/UnmappedCollectionNodeException.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/exception/UnmappedCollectionNodeException.java 2010-02-04
15:17:43 UTC (rev 20127)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/exception/UnmappedCollectionNodeException.java 2010-02-04
15:18:54 UTC (rev 20128)
@@ -31,7 +31,7 @@
private Element unmappedCollectionNode;
public UnmappedCollectionNodeException(Element unmappedCollectionNode) {
- super("Unmapped collection node '" +
DomUtils.getName(unmappedCollectionNode) + Messages.UnmappedCollectionNodeException_0);
//$NON-NLS-1$
+ super("Unmapped collection node '" +
DomUtils.getName(unmappedCollectionNode) + "'."); //$NON-NLS-1$
this.unmappedCollectionNode = unmappedCollectionNode;
}
Deleted:
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/exception/messages.properties
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/exception/messages.properties 2010-02-04
15:17:43 UTC (rev 20127)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/exception/messages.properties 2010-02-04
15:18:54 UTC (rev 20128)
@@ -1 +0,0 @@
-UnmappedCollectionNodeException_0='.
Deleted:
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/messages.properties
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/messages.properties 2010-02-04
15:17:43 UTC (rev 20127)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/messages.properties 2010-02-04
15:18:54 UTC (rev 20128)
@@ -1,7 +0,0 @@
-TemplateBuilder_0=' namespace.
-TemplateBuilder_1='. This node (or one of it's ancestors) is hidden.
-TemplateBuilder_2=Unexpected Exception. Invalid <smk:list> collection node. Has
no child elements\!
-TemplateBuilder_3=" smk:collectionItemName="
-TemplateBuilder_4=" xmlns:smk="
-TemplateBuilder_5=">
-ValueMapping_0=\#RAW_FORMATING_KEY
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/util/FreeMarkerUtil.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/util/FreeMarkerUtil.java 2010-02-04
15:17:43 UTC (rev 20127)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/util/FreeMarkerUtil.java 2010-02-04
15:18:54 UTC (rev 20128)
@@ -61,14 +61,14 @@
splitTokens[0] = splitTokens[0].substring(0, splitTokens[0].length() - 1);
}
} else {
- throw new TemplateBuilderException("Unsupported FreeMarker variable syntax
'" + dollarVariable + Messages.FreeMarkerUtil_0); //$NON-NLS-1$
+ throw new TemplateBuilderException("Unsupported FreeMarker variable syntax
'" + dollarVariable + "'."); //$NON-NLS-1$
}
return splitTokens;
}
public static boolean isDollarVariable(String variable) {
- return (variable.startsWith("${") &&
variable.endsWith(Messages.FreeMarkerUtil_1)); //$NON-NLS-1$
+ return (variable.startsWith("${") &&
variable.endsWith("}")); //$NON-NLS-1$
}
public static String toFreeMarkerVariable(ValueMapping mapping) {
@@ -80,12 +80,12 @@
encodeProperties = new Properties();
}
- builder.append(Messages.FreeMarkerUtil_2 + mapping.getSrcPath() +
Messages.FreeMarkerUtil_3);
+ builder.append("${" + mapping.getSrcPath() + "!?");
rawFormatting = encodeProperties.getProperty(ValueMapping.RAW_FORMATING_KEY);
if(rawFormatting != null) {
builder.append(rawFormatting);
- builder.append(Messages.FreeMarkerUtil_4);
+ builder.append("}");
} else {
Class<?> valueType = mapping.getValueType();
if(valueType != null) {
@@ -93,19 +93,19 @@
if(valueType == java.util.Date.class) {
String format = encodeProperties.getProperty(DateDecoder.FORMAT);
if(format != null) {
- builder.append(Messages.FreeMarkerUtil_5 + format +
Messages.FreeMarkerUtil_6);
+ builder.append("string('" + format + "')}");
} else {
- builder.append(Messages.FreeMarkerUtil_7);
+ builder.append("string.medium}");
}
} else if(Number.class.isAssignableFrom(valueType)) {
- builder.append(Messages.FreeMarkerUtil_8);
+ builder.append("c}");
} else if(valueType == Double.TYPE || valueType == Float.TYPE || valueType ==
Integer.TYPE || valueType == Long.TYPE || valueType == Short.TYPE) {
- builder.append(Messages.FreeMarkerUtil_9);
+ builder.append("c}");
} else {
- builder.append(Messages.FreeMarkerUtil_10);
+ builder.append("string}");
}
} else {
- builder.append(Messages.FreeMarkerUtil_11);
+ builder.append("string}");
}
}
Deleted:
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/util/Messages.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/util/Messages.java 2010-02-04
15:17:43 UTC (rev 20127)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/util/Messages.java 2010-02-04
15:18:54 UTC (rev 20128)
@@ -1,50 +0,0 @@
-/**
- * JBoss, Home of Professional Open Source
- * Copyright 2009, JBoss Inc., and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2009, JBoss Inc.
- */
-package org.jboss.tools.smooks.templating.template.util;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- *
- *
- * @author <a
href="mailto:tom.fennelly@jboss.com">tom.fennelly@jboss.com</a>
- */
-public class Messages extends NLS {
- private static final String BUNDLE_NAME =
"org.jboss.tools.smooks.templating.template.util.messages"; //$NON-NLS-1$
- public static String FreeMarkerUtil_0;
- public static String FreeMarkerUtil_1;
- public static String FreeMarkerUtil_10;
- public static String FreeMarkerUtil_11;
- public static String FreeMarkerUtil_2;
- public static String FreeMarkerUtil_3;
- public static String FreeMarkerUtil_4;
- public static String FreeMarkerUtil_5;
- public static String FreeMarkerUtil_6;
- public static String FreeMarkerUtil_7;
- public static String FreeMarkerUtil_8;
- public static String FreeMarkerUtil_9;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
Deleted:
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/util/messages.properties
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/util/messages.properties 2010-02-04
15:17:43 UTC (rev 20127)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/util/messages.properties 2010-02-04
15:18:54 UTC (rev 20128)
@@ -1,12 +0,0 @@
-FreeMarkerUtil_0='.
-FreeMarkerUtil_1=}
-FreeMarkerUtil_10=string}
-FreeMarkerUtil_11=string}
-FreeMarkerUtil_2=${
-FreeMarkerUtil_3=\!?
-FreeMarkerUtil_4=}
-FreeMarkerUtil_5=string('
-FreeMarkerUtil_6=')}
-FreeMarkerUtil_7=string.medium}
-FreeMarkerUtil_8=c}
-FreeMarkerUtil_9=c}
Deleted:
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/xml/Messages.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/xml/Messages.java 2010-02-04
15:17:43 UTC (rev 20127)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/xml/Messages.java 2010-02-04
15:18:54 UTC (rev 20128)
@@ -1,43 +0,0 @@
-/**
- * JBoss, Home of Professional Open Source
- * Copyright 2009, JBoss Inc., and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2009, JBoss Inc.
- */
-package org.jboss.tools.smooks.templating.template.xml;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- *
- *
- * @author <a
href="mailto:tom.fennelly@jboss.com">tom.fennelly@jboss.com</a>
- */
-public class Messages extends NLS {
- private static final String BUNDLE_NAME =
"org.jboss.tools.smooks.templating.template.xml.messages"; //$NON-NLS-1$
- public static String XMLFreeMarkerTemplateBuilder_0;
- public static String XMLFreeMarkerTemplateBuilder_1;
- public static String XMLFreeMarkerTemplateBuilder_2;
- public static String XMLFreeMarkerTemplateBuilder_3;
- public static String XMLFreeMarkerTemplateBuilder_4;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/xml/XMLFreeMarkerTemplateBuilder.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/xml/XMLFreeMarkerTemplateBuilder.java 2010-02-04
15:17:43 UTC (rev 20127)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/xml/XMLFreeMarkerTemplateBuilder.java 2010-02-04
15:18:54 UTC (rev 20128)
@@ -138,7 +138,7 @@
if(mapping instanceof CollectionMapping) {
collectionMapping = (CollectionMapping) mapping;
TemplateBuilder.writeIndent(indent, templateWriter);
- templateWriter.write("<#list " + collectionMapping.getSrcPath() +
Messages.XMLFreeMarkerTemplateBuilder_0 + collectionMapping.getCollectionItemName() +
Messages.XMLFreeMarkerTemplateBuilder_1); //$NON-NLS-1$
+ templateWriter.write("<#list " + collectionMapping.getSrcPath() +
" as " + collectionMapping.getCollectionItemName() + ">\n");
//$NON-NLS-1$
}
TemplateBuilder.writeIndent(indent, templateWriter);
@@ -334,11 +334,11 @@
// We need to rewrite the FreeMarker template so as to get rid of the FreeMarker
constructs,
// such as <#list> etc. We convert these to XML elements in the
ModelBuilder.NAMESPACE namespace.
- if(element.getNodeName().equals(Messages.XMLFreeMarkerTemplateBuilder_2)) {
+ if(element.getNodeName().equals("IteratorBlock")) {
String description = element.getDescription();
if(!description.startsWith("list")) { //$NON-NLS-1$
- throw new TemplateBuilderException ("Unsupported XML template IteratorBlock type
'" + description + Messages.XMLFreeMarkerTemplateBuilder_3); //$NON-NLS-1$
+ throw new TemplateBuilderException ("Unsupported XML template IteratorBlock type
'" + description + "'. Currently only support 'list'
IteratorBlock nodes."); //$NON-NLS-1$
}
String[] tokens = description.split(" +?"); //$NON-NLS-1$
@@ -358,7 +358,7 @@
rewriteTemplateElement(children.nextElement(), templateRewriteBuffer);
}
} else {
- if(element.getClass().getSimpleName().equals(Messages.XMLFreeMarkerTemplateBuilder_4))
{
+ if(element.getClass().getSimpleName().equals("DollarVariable")) {
templateRewriteBuffer.append(element.toString());
} else {
templateRewriteBuffer.append(element.getCanonicalForm());
Deleted:
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/xml/messages.properties
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/xml/messages.properties 2010-02-04
15:17:43 UTC (rev 20127)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/xml/messages.properties 2010-02-04
15:18:54 UTC (rev 20128)
@@ -1,5 +0,0 @@
-XMLFreeMarkerTemplateBuilder_0=\ as
-XMLFreeMarkerTemplateBuilder_1=>\n
-XMLFreeMarkerTemplateBuilder_2=IteratorBlock
-XMLFreeMarkerTemplateBuilder_3='. Currently only support 'list'
IteratorBlock nodes.
-XMLFreeMarkerTemplateBuilder_4=DollarVariable