You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2009/10/26 14:31:40 UTC

svn commit: r829788 - /myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/TaglibAnnotationVisitor.java

Author: lofwyr
Date: Mon Oct 26 13:31:39 2009
New Revision: 829788

URL: http://svn.apache.org/viewvc?rev=829788&view=rev
Log:
TOBAGO-637: undo last change, DTD says other than my IDE

Modified:
    myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/TaglibAnnotationVisitor.java

Modified: myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/TaglibAnnotationVisitor.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/TaglibAnnotationVisitor.java?rev=829788&r1=829787&r2=829788&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/TaglibAnnotationVisitor.java (original)
+++ myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/TaglibAnnotationVisitor.java Mon Oct 26 13:31:39 2009
@@ -106,15 +106,6 @@
         "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd");
       taglib.setAttribute("version", "2.1");
     }
-    String description = packageDeclaration.getDocComment();
-    if (description != null) {
-      addLeafCDATAElement(description, "description", taglib, document);
-    }
-    String displayName = taglibAnnotation.displayName();
-    if (displayName == null || displayName.length() == 0) {
-      displayName = taglibAnnotation.shortName();
-    }
-    addLeafTextElement(displayName, "display-name", taglib, document);
     if (is12()) {
       addLeafTextElement("1.2", "tlib-version", taglib, document);
     } else {
@@ -125,6 +116,15 @@
     }
     addLeafTextElement(taglibAnnotation.shortName(), "short-name", taglib, document);
     addLeafTextElement(taglibAnnotation.uri(), "uri", taglib, document);
+    String displayName = taglibAnnotation.displayName();
+    if (displayName == null || displayName.length() == 0) {
+      displayName = taglibAnnotation.shortName();
+    }
+    addLeafTextElement(displayName, "display-name", taglib, document);
+    String description = packageDeclaration.getDocComment();
+    if (description != null) {
+      addLeafCDATAElement(description, "description", taglib, document);
+    }
     for (String listenerClass : taglibAnnotation.listener()) {
       Element listener = document.createElement("listener");
       // TODO check listenerClass implements ServletContextListener !!
@@ -224,7 +224,6 @@
       Declaration decl, Tag annotationTag, String className, Document document,
       boolean deprecated) {
     Element tagElement = document.createElement("tag");
-    addDescription(decl, tagElement, document, deprecated);
     if (deprecated) {
       addLeafTextElement(annotationTag.deprecatedName(), "name", tagElement, document);
     } else {
@@ -250,6 +249,7 @@
       }
     }
     addLeafTextElement(bodyContent.toString(), "body-content", tagElement, document);
+    addDescription(decl, tagElement, document, deprecated);
     return tagElement;
   }
 
@@ -428,7 +428,6 @@
           attributeStr = tagAttribute.name();
         }
         checkAttributeDuplicates(attributeStr);
-        addDescription(d, attribute, document, false);
         addLeafTextElement(attributeStr, "name", attribute, document);
 
         addLeafTextElement(Boolean.toString(tagAttribute.required()), "required", attribute, document);
@@ -468,6 +467,7 @@
         if (tagAttribute.rtexprvalue()) {
           addLeafTextElement(Boolean.toString(tagAttribute.rtexprvalue()), "rtexprvalue", attribute, document);
         }
+        addDescription(d, attribute, document, false);
         tagElement.appendChild(attribute);
       } else {
         throw new IllegalArgumentException("Only setter allowed found: " + simpleName);