Update of /cvsroot/xdoclet/xdoclet/core/src/xdoclet/tagshandler
In directory sc8-pr-cvs1:/tmp/cvs-serv30461/core/src/xdoclet/tagshandler

Modified Files:
        ParameterTagsHandler.java TypeTagsHandler.java 
Log Message:
fixed XDT-49


Index: ParameterTagsHandler.java
===================================================================
RCS file: 
/cvsroot/xdoclet/xdoclet/core/src/xdoclet/tagshandler/ParameterTagsHandler.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** ParameterTagsHandler.java   18 Sep 2002 19:49:15 -0000      1.15
--- ParameterTagsHandler.java   21 Nov 2002 17:26:40 -0000      1.16
***************
*** 35,38 ****
--- 35,39 ----
       */
      protected static XTag currentMethodParamTag;
+     protected String currentName;
  
      public static String getMethodParamTypeFor(XParameter param)
***************
*** 205,208 ****
--- 206,211 ----
       * Gets the value of the parameter specified by paramName of current tag, and 
assuming the value has the format of a
       * typical method definition extracts of parameter types out of it and evaluates 
the body for each parameter type.
+      * current parameter type can be accessed as <XDtParameter:currentToken/>. 
+Also gives back parameter name as
+      * <XDtParameter:currentName/>
       *
       * @param attributes            The attributes of the template tag
***************
*** 223,228 ****
--- 226,233 ----
  
          StringTokenizer st = new StringTokenizer(value, ",", false);
+         int tokenNr = 0;
  
          while (st.hasMoreTokens()) {
+             tokenNr++;
              currentToken = st.nextToken().trim();
  
***************
*** 232,237 ****
--- 237,246 ----
  
              if (spaceposBetweenTypeAndName != -1) {
+                 currentName = 
+currentToken.substring(spaceposBetweenTypeAndName).trim();
                  currentToken = currentToken.substring(0, 
spaceposBetweenTypeAndName).trim();
              }
+             else {
+                 currentName = "param" + tokenNr;
+             }
  
              generate(template);
***************
*** 239,242 ****
--- 248,262 ----
  
          currentToken = oldToken;
+     }
+ 
+     /**
+      * return name of parameter currently being iterated - ugly hack...
+      *
+      * @return
+      * @doc.tag   type="content"
+      */
+     public String currentName()
+     {
+         return currentName;
      }
  

Index: TypeTagsHandler.java
===================================================================
RCS file: /cvsroot/xdoclet/xdoclet/core/src/xdoclet/tagshandler/TypeTagsHandler.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** TypeTagsHandler.java        19 Nov 2002 01:04:22 -0000      1.10
--- TypeTagsHandler.java        21 Nov 2002 17:26:40 -0000      1.11
***************
*** 231,235 ****
  
      /**
!      * Evaluate the body block if the value is of a primitive array type.
       *
       * @param template              The body of the block tag
--- 231,235 ----
  
      /**
!      * Evaluate the body block if the value is not of a primitive array type.
       *
       * @param template              The body of the block tag



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to