Author: rgielen
Date: Thu Jan 18 16:17:07 2007
New Revision: 497652
URL: http://svn.apache.org/viewvc?view=rev&rev=497652
Log:
WW-1392:
- Move annotation definitions back to core, due to making the taglib extensible
and removing the runtime deps on struts-annotations
- minor code cleanups
Removed:
struts/maven/trunk/struts-annotations/src/main/java/org/apache/struts/annotations/StrutsTag.java
struts/maven/trunk/struts-annotations/src/main/java/org/apache/struts/annotations/StrutsTagAttribute.java
Modified:
struts/maven/trunk/struts-annotations/src/main/java/org/apache/struts/annotations/taglib/apt/Tag.java
struts/maven/trunk/struts-annotations/src/main/java/org/apache/struts/annotations/taglib/apt/TagAnnotationProcessor.java
Modified:
struts/maven/trunk/struts-annotations/src/main/java/org/apache/struts/annotations/taglib/apt/Tag.java
URL:
http://svn.apache.org/viewvc/struts/maven/trunk/struts-annotations/src/main/java/org/apache/struts/annotations/taglib/apt/Tag.java?view=diff&rev=497652&r1=497651&r2=497652
==============================================================================
---
struts/maven/trunk/struts-annotations/src/main/java/org/apache/struts/annotations/taglib/apt/Tag.java
(original)
+++
struts/maven/trunk/struts-annotations/src/main/java/org/apache/struts/annotations/taglib/apt/Tag.java
Thu Jan 18 16:17:07 2007
@@ -21,7 +21,6 @@
package org.apache.struts.annotations.taglib.apt;
import java.util.Collection;
-import java.util.HashMap;
import java.util.Map;
import java.util.TreeMap;
Modified:
struts/maven/trunk/struts-annotations/src/main/java/org/apache/struts/annotations/taglib/apt/TagAnnotationProcessor.java
URL:
http://svn.apache.org/viewvc/struts/maven/trunk/struts-annotations/src/main/java/org/apache/struts/annotations/taglib/apt/TagAnnotationProcessor.java?view=diff&rev=497652&r1=497651&r2=497652
==============================================================================
---
struts/maven/trunk/struts-annotations/src/main/java/org/apache/struts/annotations/taglib/apt/TagAnnotationProcessor.java
(original)
+++
struts/maven/trunk/struts-annotations/src/main/java/org/apache/struts/annotations/taglib/apt/TagAnnotationProcessor.java
Thu Jan 18 16:17:07 2007
@@ -25,7 +25,6 @@
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.OutputStreamWriter;
-import java.io.PrintWriter;
import java.util.Collection;
import java.util.HashMap;
import java.util.TreeMap;
@@ -60,8 +59,8 @@
import freemarker.template.Template;
public class TagAnnotationProcessor implements AnnotationProcessor {
- public static final String TAG = "org.apache.struts.annotations.StrutsTag";
- public static final String TAG_ATTRIBUTE =
"org.apache.struts.annotations.StrutsTagAttribute";
+ public static final String TAG =
"org.apache.struts2.views.annotations.StrutsTag";
+ public static final String TAG_ATTRIBUTE =
"org.apache.struts2.views.annotations.StrutsTagAttribute";
private AnnotationProcessorEnvironment environment;
private AnnotationTypeDeclaration tagDeclaration;
@@ -204,7 +203,7 @@
for (Tag tag : tags.values()) {
if (tag.isInclude()) {
// model
- HashMap root = new HashMap();
+ HashMap<String, Tag> root = new HashMap<String, Tag>();
root.put("tag", tag);
// save file
@@ -258,7 +257,7 @@
// save to file
TransformerFactory tf = TransformerFactory.newInstance();
- tf.setAttribute("indent-number", new Integer(2));
+ tf.setAttribute("indent-number", 2);
Transformer transformer = tf.newTransformer();
// if tiger would just format it :(
// formatting bug in tiger
@@ -342,7 +341,7 @@
/**
* Get values of annotation
*
- * @param declaration
+ * @param declaration The annotation declaration
* @param type
* The type of the annotation
* @return name->value map of annotation values