Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpelder2009-03-16 15:36:07 -0400
committerpelder2009-03-16 15:36:07 -0400
commit098eae5666556b4e884bdfedf64f9d96306f090f (patch)
tree832445c88f7f147b94aed9dcb1bd6d9a177ddade
parentad1d6c4e28a3adde902036817b49025e438581d9 (diff)
downloadorg.eclipse.jet-098eae5666556b4e884bdfedf64f9d96306f090f.tar.gz
org.eclipse.jet-098eae5666556b4e884bdfedf64f9d96306f090f.tar.xz
org.eclipse.jet-098eae5666556b4e884bdfedf64f9d96306f090f.zip
[268864] Ensure generated tag factory classes are generated consistently
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/control/TagFactory.java113
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/format/TagFactory.java79
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/java/TagFactory.java9
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/workspace/TagFactory.java9
-rw-r--r--transforms/org.eclipse.jet.transforms.tagfactory/templates/main.jet2
-rw-r--r--transforms/org.eclipse.jet.transforms.tagfactory/templates/tagLibrary/tagFactory.java.jet13
6 files changed, 135 insertions, 90 deletions
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/control/TagFactory.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/control/TagFactory.java
index ad9cdae..12a5fc3 100644
--- a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/control/TagFactory.java
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/control/TagFactory.java
@@ -1,3 +1,11 @@
+/*
+ * *** IMPORTANT: Machine generated, DO NOT MODIFY ***
+ * Generated by:
+ * transform ID: org.eclipse.jet.transforms.tagfactory
+ * on input: /org.eclipse.jet/plugin.xml
+ *
+ * The transformation may be found in the JET CVS repository
+ */
/**
*
* Copyright (c) 2009 IBM Corporation and others.
@@ -10,6 +18,7 @@
* IBM - Initial API and implementation
*
*/
+
package org.eclipse.jet.internal.taglib.control;
import java.util.HashMap;
@@ -39,31 +48,31 @@ public class TagFactory implements TagInstanceFactory
tagOrdinalByName.put("case",new Integer(3)); //$NON-NLS-1$
tagOrdinalByName.put("choose",new Integer(4)); //$NON-NLS-1$
tagOrdinalByName.put("copyElement",new Integer(5)); //$NON-NLS-1$
- tagOrdinalByName.put("dump",new Integer(6)); //$NON-NLS-1$
- tagOrdinalByName.put("get",new Integer(7)); //$NON-NLS-1$
- tagOrdinalByName.put("if",new Integer(8)); //$NON-NLS-1$
- tagOrdinalByName.put("include",new Integer(9)); //$NON-NLS-1$
- tagOrdinalByName.put("initialCode",new Integer(10)); //$NON-NLS-1$
- tagOrdinalByName.put("invokeTransform",new Integer(11)); //$NON-NLS-1$
- tagOrdinalByName.put("iterate",new Integer(12)); //$NON-NLS-1$
- tagOrdinalByName.put("load",new Integer(13)); //$NON-NLS-1$
- tagOrdinalByName.put("loadContent",new Integer(14)); //$NON-NLS-1$
- tagOrdinalByName.put("log",new Integer(15)); //$NON-NLS-1$
- tagOrdinalByName.put("marker",new Integer(16)); //$NON-NLS-1$
- tagOrdinalByName.put("otherwise",new Integer(17)); //$NON-NLS-1$
- tagOrdinalByName.put("override",new Integer(18)); //$NON-NLS-1$
- tagOrdinalByName.put("removeElement",new Integer(19)); //$NON-NLS-1$
- tagOrdinalByName.put("replaceStrings",new Integer(20)); //$NON-NLS-1$
- tagOrdinalByName.put("set",new Integer(21)); //$NON-NLS-1$
- tagOrdinalByName.put("setVariable",new Integer(22)); //$NON-NLS-1$
- tagOrdinalByName.put("stringTokens",new Integer(23)); //$NON-NLS-1$
- tagOrdinalByName.put("userRegion",new Integer(24)); //$NON-NLS-1$
- tagOrdinalByName.put("visit",new Integer(25)); //$NON-NLS-1$
- tagOrdinalByName.put("visitor",new Integer(26)); //$NON-NLS-1$
- tagOrdinalByName.put("when",new Integer(27)); //$NON-NLS-1$
- tagOrdinalByName.put("with",new Integer(28)); //$NON-NLS-1$
- tagOrdinalByName.put("deepIterate",new Integer(29)); //$NON-NLS-1$
- tagOrdinalByName.put("deepContent",new Integer(30)); //$NON-NLS-1$
+ tagOrdinalByName.put("deepContent",new Integer(6)); //$NON-NLS-1$
+ tagOrdinalByName.put("deepIterate",new Integer(7)); //$NON-NLS-1$
+ tagOrdinalByName.put("dump",new Integer(8)); //$NON-NLS-1$
+ tagOrdinalByName.put("get",new Integer(9)); //$NON-NLS-1$
+ tagOrdinalByName.put("if",new Integer(10)); //$NON-NLS-1$
+ tagOrdinalByName.put("include",new Integer(11)); //$NON-NLS-1$
+ tagOrdinalByName.put("initialCode",new Integer(12)); //$NON-NLS-1$
+ tagOrdinalByName.put("invokeTransform",new Integer(13)); //$NON-NLS-1$
+ tagOrdinalByName.put("iterate",new Integer(14)); //$NON-NLS-1$
+ tagOrdinalByName.put("load",new Integer(15)); //$NON-NLS-1$
+ tagOrdinalByName.put("loadContent",new Integer(16)); //$NON-NLS-1$
+ tagOrdinalByName.put("log",new Integer(17)); //$NON-NLS-1$
+ tagOrdinalByName.put("marker",new Integer(18)); //$NON-NLS-1$
+ tagOrdinalByName.put("otherwise",new Integer(19)); //$NON-NLS-1$
+ tagOrdinalByName.put("override",new Integer(20)); //$NON-NLS-1$
+ tagOrdinalByName.put("removeElement",new Integer(21)); //$NON-NLS-1$
+ tagOrdinalByName.put("replaceStrings",new Integer(22)); //$NON-NLS-1$
+ tagOrdinalByName.put("set",new Integer(23)); //$NON-NLS-1$
+ tagOrdinalByName.put("setVariable",new Integer(24)); //$NON-NLS-1$
+ tagOrdinalByName.put("stringTokens",new Integer(25)); //$NON-NLS-1$
+ tagOrdinalByName.put("userRegion",new Integer(26)); //$NON-NLS-1$
+ tagOrdinalByName.put("visit",new Integer(27)); //$NON-NLS-1$
+ tagOrdinalByName.put("visitor",new Integer(28)); //$NON-NLS-1$
+ tagOrdinalByName.put("when",new Integer(29)); //$NON-NLS-1$
+ tagOrdinalByName.put("with",new Integer(30)); //$NON-NLS-1$
}
public CustomTag createCustomTag(String name)
@@ -81,56 +90,56 @@ public class TagFactory implements TagInstanceFactory
return new org.eclipse.jet.internal.taglib.control.ChooseTag();
case 5: // copyElement
return new org.eclipse.jet.internal.taglib.control.CopyElementTag();
- case 6: // dump
+ case 6: // deepContent
+ return new org.eclipse.jet.internal.taglib.control.DeepContentTag();
+ case 7: // deepIterate
+ return new org.eclipse.jet.internal.taglib.control.DeepIterateTag();
+ case 8: // dump
return new org.eclipse.jet.internal.taglib.control.DumpTag();
- case 7: // get
+ case 9: // get
return new org.eclipse.jet.internal.taglib.control.GetTag();
- case 8: // if
+ case 10: // if
return new org.eclipse.jet.internal.taglib.control.IfTag();
- case 9: // include
+ case 11: // include
return new org.eclipse.jet.internal.taglib.control.IncludeTag();
- case 10: // initialCode
+ case 12: // initialCode
return new org.eclipse.jet.internal.taglib.control.InitialCodeTag();
- case 11: // invokeTransform
+ case 13: // invokeTransform
return new org.eclipse.jet.internal.taglib.control.InvokeTransformTag();
- case 12: // iterate
+ case 14: // iterate
return new org.eclipse.jet.internal.taglib.control.IterateTag();
- case 13: // load
+ case 15: // load
return new org.eclipse.jet.internal.taglib.control.LoadTag();
- case 14: // loadContent
+ case 16: // loadContent
return new org.eclipse.jet.internal.taglib.control.LoadContentTag();
- case 15: // log
+ case 17: // log
return new org.eclipse.jet.internal.taglib.control.LogTag();
- case 16: // marker
+ case 18: // marker
return new org.eclipse.jet.internal.taglib.control.MarkerTag();
- case 17: // otherwise
+ case 19: // otherwise
return new org.eclipse.jet.internal.taglib.control.OtherwiseTag();
- case 18: // override
+ case 20: // override
return new org.eclipse.jet.internal.taglib.control.OverrideTag();
- case 19: // removeElement
+ case 21: // removeElement
return new org.eclipse.jet.internal.taglib.control.RemoveElementTag();
- case 20: // replaceStrings
+ case 22: // replaceStrings
return new org.eclipse.jet.internal.taglib.control.ReplaceStringsTag();
- case 21: // set
+ case 23: // set
return new org.eclipse.jet.internal.taglib.control.SetTag();
- case 22: // setVariable
+ case 24: // setVariable
return new org.eclipse.jet.internal.taglib.control.SetVariableTag();
- case 23: // stringTokens
+ case 25: // stringTokens
return new org.eclipse.jet.internal.taglib.control.StringTokensTag();
- case 24: // userRegion
+ case 26: // userRegion
return new org.eclipse.jet.internal.taglib.control.UserRegionTag();
- case 25: // visit
+ case 27: // visit
return new org.eclipse.jet.internal.taglib.control.VisitTag();
- case 26: // visitor
+ case 28: // visitor
return new org.eclipse.jet.internal.taglib.control.VisitorTag();
- case 27: // when
+ case 29: // when
return new org.eclipse.jet.internal.taglib.control.WhenTag();
- case 28: // with
+ case 30: // with
return new org.eclipse.jet.internal.taglib.control.WithTag();
- case 29: // deepIterate
- return new org.eclipse.jet.internal.taglib.control.DeepIterateTag();
- case 30: // deepContent
- return new org.eclipse.jet.internal.taglib.control.DeepContentTag();
default:
throw new JET2TagException("Unknown Tag: " + name); //$NON-NLS-1$
}
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/format/TagFactory.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/format/TagFactory.java
index d51e168..2e42a52 100644
--- a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/format/TagFactory.java
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/format/TagFactory.java
@@ -1,3 +1,11 @@
+/*
+ * *** IMPORTANT: Machine generated, DO NOT MODIFY ***
+ * Generated by:
+ * transform ID: org.eclipse.jet.transforms.tagfactory
+ * on input: /org.eclipse.jet/plugin.xml
+ *
+ * The transformation may be found in the JET CVS repository
+ */
/**
*
* Copyright (c) 2009 IBM Corporation and others.
@@ -10,6 +18,7 @@
* IBM - Initial API and implementation
*
*/
+
package org.eclipse.jet.internal.taglib.format;
import java.util.HashMap;
@@ -34,21 +43,21 @@ public class TagFactory implements TagInstanceFactory
{
tagOrdinalByName = new HashMap(15);
- tagOrdinalByName.put("formatNow",new Integer(1)); //$NON-NLS-1$
- tagOrdinalByName.put("indent",new Integer(2)); //$NON-NLS-1$
- tagOrdinalByName.put("lc",new Integer(3)); //$NON-NLS-1$
- tagOrdinalByName.put("milliseconds",new Integer(4)); //$NON-NLS-1$
- tagOrdinalByName.put("replaceAll",new Integer(5)); //$NON-NLS-1$
- tagOrdinalByName.put("strip",new Integer(6)); //$NON-NLS-1$
- tagOrdinalByName.put("uc",new Integer(7)); //$NON-NLS-1$
- tagOrdinalByName.put("unique",new Integer(8)); //$NON-NLS-1$
- tagOrdinalByName.put("uuid",new Integer(9)); //$NON-NLS-1$
- tagOrdinalByName.put("xpath",new Integer(10)); //$NON-NLS-1$
- tagOrdinalByName.put("message",new Integer(11)); //$NON-NLS-1$
- tagOrdinalByName.put("param",new Integer(12)); //$NON-NLS-1$
- tagOrdinalByName.put("bundle",new Integer(13)); //$NON-NLS-1$
- tagOrdinalByName.put("setBundle",new Integer(14)); //$NON-NLS-1$
- tagOrdinalByName.put("setLocale",new Integer(15)); //$NON-NLS-1$
+ tagOrdinalByName.put("bundle",new Integer(1)); //$NON-NLS-1$
+ tagOrdinalByName.put("formatNow",new Integer(2)); //$NON-NLS-1$
+ tagOrdinalByName.put("indent",new Integer(3)); //$NON-NLS-1$
+ tagOrdinalByName.put("lc",new Integer(4)); //$NON-NLS-1$
+ tagOrdinalByName.put("message",new Integer(5)); //$NON-NLS-1$
+ tagOrdinalByName.put("milliseconds",new Integer(6)); //$NON-NLS-1$
+ tagOrdinalByName.put("param",new Integer(7)); //$NON-NLS-1$
+ tagOrdinalByName.put("replaceAll",new Integer(8)); //$NON-NLS-1$
+ tagOrdinalByName.put("setBundle",new Integer(9)); //$NON-NLS-1$
+ tagOrdinalByName.put("setLocale",new Integer(10)); //$NON-NLS-1$
+ tagOrdinalByName.put("strip",new Integer(11)); //$NON-NLS-1$
+ tagOrdinalByName.put("uc",new Integer(12)); //$NON-NLS-1$
+ tagOrdinalByName.put("unique",new Integer(13)); //$NON-NLS-1$
+ tagOrdinalByName.put("uuid",new Integer(14)); //$NON-NLS-1$
+ tagOrdinalByName.put("xpath",new Integer(15)); //$NON-NLS-1$
}
public CustomTag createCustomTag(String name)
@@ -56,36 +65,36 @@ public class TagFactory implements TagInstanceFactory
Integer ordinal = (Integer)tagOrdinalByName.get(name);
switch(ordinal == null ? 0 : ordinal.intValue()) {
- case 1: // formatNow
+ case 1: // bundle
+ return new org.eclipse.jet.internal.taglib.format.BundleTag();
+ case 2: // formatNow
return new org.eclipse.jet.internal.taglib.format.FormatNowTag();
- case 2: // indent
+ case 3: // indent
return new org.eclipse.jet.internal.taglib.format.IndentTag();
- case 3: // lc
+ case 4: // lc
return new org.eclipse.jet.internal.taglib.format.LowerCaseTag();
- case 4: // milliseconds
+ case 5: // message
+ return new org.eclipse.jet.internal.taglib.format.MessageTag();
+ case 6: // milliseconds
return new org.eclipse.jet.internal.taglib.format.MillisecondsTag();
- case 5: // replaceAll
+ case 7: // param
+ return new org.eclipse.jet.internal.taglib.format.ParamTag();
+ case 8: // replaceAll
return new org.eclipse.jet.internal.taglib.format.ReplaceAllTag();
- case 6: // strip
+ case 9: // setBundle
+ return new org.eclipse.jet.internal.taglib.format.SetBundleTag();
+ case 10: // setLocale
+ return new org.eclipse.jet.internal.taglib.format.SetLocaleTag();
+ case 11: // strip
return new org.eclipse.jet.internal.taglib.format.StripTag();
- case 7: // uc
+ case 12: // uc
return new org.eclipse.jet.internal.taglib.format.UpperCaseTag();
- case 8: // unique
+ case 13: // unique
return new org.eclipse.jet.internal.taglib.format.UniqueTag();
- case 9: // uuid
+ case 14: // uuid
return new org.eclipse.jet.internal.taglib.format.UuidTag();
- case 10: // xpath
+ case 15: // xpath
return new org.eclipse.jet.internal.taglib.format.XPathTag();
- case 11: // message
- return new org.eclipse.jet.internal.taglib.format.MessageTag();
- case 12: // param
- return new org.eclipse.jet.internal.taglib.format.ParamTag();
- case 13: // bundle
- return new org.eclipse.jet.internal.taglib.format.BundleTag();
- case 14: // setBundle
- return new org.eclipse.jet.internal.taglib.format.SetBundleTag();
- case 15: // setLocale
- return new org.eclipse.jet.internal.taglib.format.SetLocaleTag();
default:
throw new JET2TagException("Unknown Tag: " + name); //$NON-NLS-1$
}
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/java/TagFactory.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/java/TagFactory.java
index 7be175a..8f148d7 100644
--- a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/java/TagFactory.java
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/java/TagFactory.java
@@ -1,3 +1,11 @@
+/*
+ * *** IMPORTANT: Machine generated, DO NOT MODIFY ***
+ * Generated by:
+ * transform ID: org.eclipse.jet.transforms.tagfactory
+ * on input: /org.eclipse.jet/plugin.xml
+ *
+ * The transformation may be found in the JET CVS repository
+ */
/**
*
* Copyright (c) 2009 IBM Corporation and others.
@@ -10,6 +18,7 @@
* IBM - Initial API and implementation
*
*/
+
package org.eclipse.jet.internal.taglib.java;
import java.util.HashMap;
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/workspace/TagFactory.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/workspace/TagFactory.java
index 8268c98..b4c03e9 100644
--- a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/workspace/TagFactory.java
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/workspace/TagFactory.java
@@ -1,3 +1,11 @@
+/*
+ * *** IMPORTANT: Machine generated, DO NOT MODIFY ***
+ * Generated by:
+ * transform ID: org.eclipse.jet.transforms.tagfactory
+ * on input: /org.eclipse.jet/plugin.xml
+ *
+ * The transformation may be found in the JET CVS repository
+ */
/**
*
* Copyright (c) 2009 IBM Corporation and others.
@@ -10,6 +18,7 @@
* IBM - Initial API and implementation
*
*/
+
package org.eclipse.jet.internal.taglib.workspace;
import java.util.HashMap;
diff --git a/transforms/org.eclipse.jet.transforms.tagfactory/templates/main.jet b/transforms/org.eclipse.jet.transforms.tagfactory/templates/main.jet
index 70a2c8c..1bd16aa 100644
--- a/transforms/org.eclipse.jet.transforms.tagfactory/templates/main.jet
+++ b/transforms/org.eclipse.jet.transforms.tagfactory/templates/main.jet
@@ -12,7 +12,7 @@ the results as model annotations via c:set tag
<c:set select="$tagLibrary" name="numTags"><c:get select="count($tagLibrary/*['Tag' = substring(local-name(), string-length(local-name()) - 2, 3)])"/></c:set>
<c:set select="$tagLibrary" name="pkgFactory"><c:get select="packageName($tagLibrary/@tagFactory)"/></c:set>
<c:set select="$tagLibrary" name="clsFactory"><c:get select="className($tagLibrary/@tagFactory)"/></c:set>
- <c:iterate select="$tagLibrary/*['Tag' = substring(local-name(), string-length(local-name()) - 2, 3)]" var="tag">
+ <c:iterate select="sort($tagLibrary/*['Tag' = substring(local-name(), string-length(local-name()) - 2, 3)], '@name')" var="tag">
<c:set select="$tag" name="ordinal"><c:get select="$ordinal"/></c:set>
<c:setVariable var="ordinal" select="$ordinal + 1"/>
</c:iterate>
diff --git a/transforms/org.eclipse.jet.transforms.tagfactory/templates/tagLibrary/tagFactory.java.jet b/transforms/org.eclipse.jet.transforms.tagfactory/templates/tagLibrary/tagFactory.java.jet
index f5e17fd..ce14af8 100644
--- a/transforms/org.eclipse.jet.transforms.tagfactory/templates/tagLibrary/tagFactory.java.jet
+++ b/transforms/org.eclipse.jet.transforms.tagfactory/templates/tagLibrary/tagFactory.java.jet
@@ -1,3 +1,11 @@
+/*
+ * *** IMPORTANT: Machine generated, DO NOT MODIFY ***
+ * Generated by:
+ * transform ID: <%= context.getJETBundleId() %>
+ * on input: <c:get select="$org.eclipse.jet.resource.fullPath"/>
+ *
+ * The transformation may be found in the JET CVS repository
+ */
/**
*
* Copyright (c) <f:formatNow pattern="yyyy"/> IBM Corporation and others.
@@ -10,6 +18,7 @@
* IBM - Initial API and implementation
*
*/
+
package <c:get select="$tagLibrary/@pkgFactory"/>;
import java.util.HashMap;
@@ -34,7 +43,7 @@ public class <c:get select="$tagLibrary/@clsFactory"/> implements TagInstanceFac
{
tagOrdinalByName = new HashMap(<c:get select="$tagLibrary/@numTags"/>);
-<c:iterate select="$tagLibrary/*['Tag' = substring(local-name(), string-length(local-name()) - 2, 3)]" var="tag">
+<c:iterate select="sort($tagLibrary/*['Tag' = substring(local-name(), string-length(local-name()) - 2, 3)], '@name')" var="tag">
tagOrdinalByName.put("<c:get select="$tag/@name"/>",new Integer(<c:get select="$tag/@ordinal"/>)); //$NON-NLS-1$
</c:iterate>
}
@@ -44,7 +53,7 @@ public class <c:get select="$tagLibrary/@clsFactory"/> implements TagInstanceFac
Integer ordinal = (Integer)tagOrdinalByName.get(name);
switch(ordinal == null ? 0 : ordinal.intValue()) {
-<c:iterate select="$tagLibrary/*['Tag' = substring(local-name(), string-length(local-name()) - 2, 3)]" var="tag">
+<c:iterate select="sort($tagLibrary/*['Tag' = substring(local-name(), string-length(local-name()) - 2, 3)], '@name')" var="tag">
case <c:get select="$tag/@ordinal"/>: // <c:get select="$tag/@name"/>
return new <c:get select="$tag/@class"/>();
</c:iterate>

Back to the top