ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From co...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs Javadoc.java
Date Fri, 05 Apr 2002 14:57:36 GMT
conor       02/04/05 06:57:36

  Modified:    src/main/org/apache/tools/ant/taskdefs Javadoc.java
  Log:
  Preserve ordering of taglets and tags by using one list
  
  Revision  Changes    Path
  1.85      +19 -23    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
  
  Index: Javadoc.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javadoc.java,v
  retrieving revision 1.84
  retrieving revision 1.85
  diff -u -w -u -r1.84 -r1.85
  --- Javadoc.java	5 Apr 2002 14:27:48 -0000	1.84
  +++ Javadoc.java	5 Apr 2002 14:57:36 -0000	1.85
  @@ -273,7 +273,6 @@
       private Vector links = new Vector(2);
       private Vector groups = new Vector(2);
       private Vector tags = new Vector(5);
  -    private Vector taglets = new Vector(2);
       private boolean useDefaultExcludes = true;
       private Html doctitle = null;
       private Html header = null;
  @@ -428,7 +427,7 @@
       }
   
       public void addTaglet(ExtensionInfo tagletInfo) {
  -        taglets.addElement(tagletInfo);
  +        tags.addElement(tagletInfo);
       }
       
       public void setOld(boolean b) {
  @@ -666,9 +665,6 @@
        * custom tags. This argument is only available for JavaDoc 1.4,
        * and will generate a verbose message (and then be ignored)
        * when run on Java versions below 1.4.
  -     * 
  -     * @todo Add -taglet as well - need to preserve the order
  -     * of tag/taglet, so they need to be stored in the same list
        */
       public TagArgument createTag() {
           if (!javadoc4) {
  @@ -1079,14 +1075,18 @@
               
               // JavaDoc 1.4 parameters
               if (javadoc4) {
  -                for (Enumeration e = taglets.elements(); e.hasMoreElements(); ) {
  +                for (Enumeration e = tags.elements(); e.hasMoreElements(); ) {
  +                    Object element = e.nextElement();
  +                    if (element instanceof TagArgument) {
  +                        TagArgument ta = (TagArgument) element;
  +                        toExecute.createArgument().setValue ("-tag");
  +                        toExecute.createArgument().setValue (ta.getParameter());
  +                    } else {
                       ExtensionInfo tagletInfo 
  -                        = (ExtensionInfo) e.nextElement();
  +                            = (ExtensionInfo) element;
                       toExecute.createArgument().setValue("-taglet");
                       toExecute.createArgument().setValue(tagletInfo.getName());
                       if (tagletInfo.getPath() != null) {
  -                        log("Taglet base path is " + tagletInfo.getPath(),
  -                            MSG_DEBUG);
                           Path tagletPath 
                               = tagletInfo.getPath().concatSystemClasspath("ignore");
                           if (tagletPath.size() != 0) {
  @@ -1095,10 +1095,6 @@
                           }
                       }
                   }
  -                for (Enumeration e = tags.elements(); e.hasMoreElements(); ) {
  -                    TagArgument ta = (TagArgument) e.nextElement();
  -                    toExecute.createArgument().setValue ("-tag");
  -                    toExecute.createArgument().setValue (ta.getParameter());
                   }
               }
   
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message