diff --git a/docs/manual/CoreTasks/javadoc.html b/docs/manual/CoreTasks/javadoc.html index 2a0fed68c..d0d818a10 100644 --- a/docs/manual/CoreTasks/javadoc.html +++ b/docs/manual/CoreTasks/javadoc.html @@ -40,7 +40,7 @@ versions, you are strongly encouraged to use javadoc instead.

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.

Parameters

@@ -397,7 +397,23 @@ means any VM of at least version 1.2.

present in J2SE v 1.4 source code. Set this to "1.4" to documents code that compiles using "javac -source 1.4". - 1.4 + 1.4+ + No + + + linksource + Generate hyperlinks to source files. + since Ant 1.6. + (yes | no). Default is no. + 1.4+ + No + + + breakiterator + Use the new breakiterator algorithm. + since Ant 1.6. + (yes | no). Default is no. + 1.4+ No diff --git a/src/main/org/apache/tools/ant/taskdefs/Javadoc.java b/src/main/org/apache/tools/ant/taskdefs/Javadoc.java index afd037752..8ce73804b 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Javadoc.java +++ b/src/main/org/apache/tools/ant/taskdefs/Javadoc.java @@ -466,6 +466,8 @@ public class Javadoc extends Task { 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 @@ public class Javadoc extends Task { 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. !!"); @@ -1793,6 +1823,13 @@ public class Javadoc extends Task { toExecute.createArgument().setValue("-source"); toExecute.createArgument().setValue(source); } + + if (linksource && doclet == null) { + toExecute.createArgument().setValue("-linksource"); + } + if (breakiterator && doclet == null) { + toExecute.createArgument().setValue("-breakiterator"); + } } }