bodewig     2003/04/17 06:41:25

  Modified:    docs/manual/CoreTasks javadoc.html
               src/main/org/apache/tools/ant/taskdefs Javadoc.java
  Log:
  Add linksource attribute to Javadoc.
  
  Submitted by: <smagoun at mac dot com>
  
  Add breakiterator attribute to Javadoc.
  
  PR: 11569
  
  Revision  Changes    Path
  1.24      +18 -2     ant/docs/manual/CoreTasks/javadoc.html
  
  Index: javadoc.html
  ===================================================================
  RCS file: /home/cvs/ant/docs/manual/CoreTasks/javadoc.html,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- javadoc.html      5 Mar 2003 03:03:11 -0000       1.23
  +++ javadoc.html      17 Apr 2003 13:41:25 -0000      1.24
  @@ -40,7 +40,7 @@
   instead.</i></p>
   
   <p>In the table below, 1.1 means available if your current Java VM is
  -a 1.1 VM, 1.2 for either 1.2 or 1.3 and 1.4 for a 1.4 Java VM.  1.2+
  +a 1.1 VM, 1.2 for either 1.2 or 1.3 and 1.4+ for any VM of at least version 
1.4.  1.2+
   means any VM of at least version 1.2.</p>
   
   <h3>Parameters</h3>
  @@ -397,7 +397,23 @@
       present in J2SE v 1.4 source code. Set this to &quot;1.4&quot; to
       documents code that compiles using <code>&quot;javac -source
       1.4&quot;</code>.</td>
  -    <td align="center" valign="top">1.4</td>
  +    <td align="center" valign="top">1.4+</td>
  +    <td align="center" valign="top">No</td>
  +  </tr>
  +  <tr>
  +    <td valign="top">linksource</td>
  +    <td valign="top">Generate hyperlinks to source files.
  +      <em>since Ant 1.6</em>.
  +      (<code>yes</code> | <code>no</code>). Default is no.</td>
  +    <td align="center" valign="top">1.4+</td>
  +    <td align="center" valign="top">No</td>
  +  </tr>
  +  <tr>
  +    <td valign="top">breakiterator</td>
  +    <td valign="top">Use the new breakiterator algorithm.
  +      <em>since Ant 1.6</em>.
  +      (<code>yes</code> | <code>no</code>). Default is no.</td>
  +    <td align="center" valign="top">1.4+</td>
       <td align="center" valign="top">No</td>
     </tr>
   </table>
  
  
  
  1.112     +37 -0     ant/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
  
  Index: Javadoc.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Javadoc.java,v
  retrieving revision 1.111
  retrieving revision 1.112
  diff -u -r1.111 -r1.112
  --- Javadoc.java      4 Apr 2003 13:51:11 -0000       1.111
  +++ Javadoc.java      17 Apr 2003 13:41:25 -0000      1.112
  @@ -466,6 +466,8 @@
       private boolean useExternalFile = false;
       private FileUtils fileUtils = FileUtils.newFileUtils();
       private String source = null;
  +    private boolean linksource = false;
  +    private boolean breakiterator = false;
   
       private Vector fileSets = new Vector();
       private Vector packageSets = new Vector();
  @@ -1502,6 +1504,34 @@
           fileSets.addElement(fs);
       }
   
  +    /**
  +     * Enables the -linksource switch, will be ignored if javadoc is not
  +     * the 1.4 version. Default is false
  +     *
  +     * @since Ant 1.6
  +     */
  +    public void setLinksource(boolean b) {
  +        if (!javadoc4) {
  +            log ("-linksource option not supported on JavaDoc < 1.4",
  +                 Project.MSG_VERBOSE);
  +        }
  +        this.linksource = b;       
  +    }
  +
  +    /**
  +     * Enables the -linksource switch, will be ignored if javadoc is not
  +     * the 1.4 version. Default is false
  +     *
  +     * @since Ant 1.6
  +     */
  +    public void setBreakiterator(boolean b) {
  +        if (!javadoc4) {
  +            log ("-breakiterator option not supported on JavaDoc < 1.4",
  +                 Project.MSG_VERBOSE);
  +        }
  +        this.breakiterator = b;       
  +    }
  +
       public void execute() throws BuildException {
           if ("javadoc2".equals(getTaskType())) {
               log("!! javadoc2 is deprecated. Use javadoc instead. !!");
  @@ -1792,6 +1822,13 @@
                   if (source != null) {
                       toExecute.createArgument().setValue("-source");
                       toExecute.createArgument().setValue(source);
  +                }
  +                
  +                if (linksource && doclet == null) {
  +                    toExecute.createArgument().setValue("-linksource");
  +                }
  +                if (breakiterator && doclet == null) {
  +                    toExecute.createArgument().setValue("-breakiterator");
                   }
               }
   
  
  
  

Reply via email to