changeset 1915:1090777d4103

8035473: [javadoc] Revamp the existing Doclet APIs 8146529: Update the new Doclet API 8146427: "-nohelp" option issue 8146475: "-helpfile" option issue Reviewed-by: alanb, bpatel, ihse, jjg, jlahoda, mchung, ogb, vromero
author ksrini
date Thu, 12 Nov 2015 13:26:07 -0800
parents f2e63f76b3d2
children 087de87e0340
files common/autoconf/spec.gmk.in make/Javadoc.gmk make/common/NON_CORE_PKGS.gmk modules.xml
diffstat 4 files changed, 76 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/common/autoconf/spec.gmk.in	Thu Jan 28 19:42:10 2016 +0300
+++ b/common/autoconf/spec.gmk.in	Thu Nov 12 13:26:07 2015 -0800
@@ -500,7 +500,7 @@
 INTERIM_LANGTOOLS_JAR = $(BUILDTOOLS_OUTPUTDIR)/interim_langtools.jar
 INTERIM_LANGTOOLS_ARGS = "-Xbootclasspath/p:$(INTERIM_LANGTOOLS_JAR)" -cp $(INTERIM_LANGTOOLS_JAR)
 NEW_JAVAC   = $(INTERIM_LANGTOOLS_ARGS) com.sun.tools.javac.Main
-NEW_JAVADOC = $(INTERIM_LANGTOOLS_ARGS) com.sun.tools.javadoc.Main
+NEW_JAVADOC = $(INTERIM_LANGTOOLS_ARGS) jdk.javadoc.internal.tool.Main 
 
 # Base flags for RC
 # Guarding this against resetting value. Legacy make files include spec multiple
--- a/make/Javadoc.gmk	Thu Jan 28 19:42:10 2016 +0300
+++ b/make/Javadoc.gmk	Thu Nov 12 13:26:07 2015 -0800
@@ -418,7 +418,7 @@
 DOCLETAPI_HEADER := <strong>Doclet API</strong>
 DOCLETAPI_BOTTOM := $(call CommonTrademarkBottom,$(DOCLETAPI_FIRST_COPYRIGHT_YEAR))
 DOCLETAPI_GROUPNAME := Packages
-DOCLETAPI_REGEXP := com.sun.javadoc
+DOCLETAPI_REGEXP := jdk.javadoc.doclet.*
 # DOCLETAPI_PKGS is located in NON_CORE_PKGS.gmk
 
 # The index.html, options, and packages files
@@ -462,12 +462,69 @@
 
 #############################################################
 #
+# old docletapidocs
+#
+
+ALL_OTHER_TARGETS += olddocletapidocs
+
+OLD_DOCLET_DIR := $(JDK_API_DOCSDIR)/javadoc/old
+OLD_DOCLETAPI_DOCDIR := $(OLD_DOCLET_DIR)/doclet
+OLD_DOCLETAPI2COREAPI := ../../../$(JDKJRE2COREAPI)
+OLD_DOCLETAPI_DOCTITLE := Doclet API
+OLD_DOCLETAPI_WINDOWTITLE := Doclet API
+OLD_DOCLETAPI_HEADER := <strong>Doclet API</strong>
+OLD_DOCLETAPI_BOTTOM := $(call CommonTrademarkBottom,$(DOCLETAPI_FIRST_COPYRIGHT_YEAR))
+OLD_DOCLETAPI_GROUPNAME := Packages
+OLD_DOCLETAPI_REGEXP := com.sun.javadoc
+# OLD_DOCLETAPI_PKGS is located in NON_CORE_PKGS.gmk
+
+# The index.html, options, and packages files
+OLD_DOCLETAPI_INDEX_FILE = $(OLD_DOCLETAPI_DOCDIR)/index.html
+OLD_DOCLETAPI_OPTIONS_FILE = $(DOCSTMPDIR)/old-docletapi.options
+OLD_DOCLETAPI_PACKAGES_FILE = $(DOCSTMPDIR)/old-docletapi.packages
+
+olddocletapidocs: $(OLD_DOCLETAPI_INDEX_FILE)
+
+# Set relative location to core api document root
+$(OLD_DOCLETAPI_INDEX_FILE): GET2DOCSDIR=$(OLD_DOCLETAPI2COREAPI)/..
+
+# Run javadoc if the index file is out of date or missing
+$(OLD_DOCLETAPI_INDEX_FILE): $(OLD_DOCLETAPI_OPTIONS_FILE) $(OLD_DOCLETAPI_PACKAGES_FILE) $(COREAPI_INDEX_FILE)
+	$(prep-javadoc)
+	$(call JavadocSummary,$(OLD_DOCLETAPI_OPTIONS_FILE),$(OLD_DOCLETAPI_PACKAGES_FILE))
+	$(JAVADOC_CMD_SMALL) -d $(@D) \
+	    @$(OLD_DOCLETAPI_OPTIONS_FILE) @$(OLD_DOCLETAPI_PACKAGES_FILE)
+
+# Create file with javadoc options in it
+$(OLD_DOCLETAPI_OPTIONS_FILE):
+	$(prep-target)
+	@($(call COMMON_JAVADOCFLAGS) ; \
+          $(call COMMON_JAVADOCTAGS) ; \
+	  $(call OptionOnly,-Xdoclint:all) ; \
+	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
+	  $(call OptionPair,-encoding,ascii) ; \
+	  $(call OptionOnly,-breakiterator) ; \
+	  $(call OptionPair,-doctitle,$(OLD_DOCLETAPI_DOCTITLE)) ; \
+	  $(call OptionPair,-windowtitle,$(OLD_DOCLETAPI_WINDOWTITLE) $(DRAFT_WINTITLE)); \
+	  $(call OptionPair,-header,$(OLD_DOCLETAPI_HEADER)$(DRAFT_HEADER)) ; \
+	  $(call OptionPair,-bottom,$(OLD_DOCLETAPI_BOTTOM)$(DRAFT_BOTTOM)) ; \
+	  $(call OptionTrip,-group,$(OLD_DOCLETAPI_GROUPNAME),$(OLD_DOCLETAPI_REGEXP)); \
+	  $(call OptionTrip,-linkoffline,$(OLD_DOCLETAPI2COREAPI),$(COREAPI_DOCSDIR)/); \
+	) >> $@
+
+# Create a file with the package names in it
+$(OLD_DOCLETAPI_PACKAGES_FILE): $(call PackageDependencies,$(OLD_DOCLETAPI_PKGS))
+	$(prep-target)
+	$(call PackageFilter,$(OLD_DOCLETAPI_PKGS))
+
+#############################################################
+#
 # tagletapidocs
 #
 
 ALL_OTHER_TARGETS += tagletapidocs
-TAGLETAPI_DOCDIR := $(JDK_API_DOCSDIR)/javadoc/taglet
-TAGLETAPI2COREAPI := ../../$(JDKJRE2COREAPI)
+TAGLETAPI_DOCDIR := $(OLD_DOCLET_DIR)/taglet
+TAGLETAPI2COREAPI := ../../../$(JDKJRE2COREAPI)
 TAGLETAPI_BOTTOM := $(call CommonTrademarkBottom,$(TAGLETAPI_FIRST_COPYRIGHT_YEAR))
 # TAGLETAPI_FILE is located in NON_CORE_PKGS.gmk
 
--- a/make/common/NON_CORE_PKGS.gmk	Thu Jan 28 19:42:10 2016 +0300
+++ b/make/common/NON_CORE_PKGS.gmk	Thu Nov 12 13:26:07 2015 -0800
@@ -66,7 +66,10 @@
 
 NIO_PKGS = com.sun.nio.file
 
-DOCLETAPI_PKGS = com.sun.javadoc
+OLD_DOCLETAPI_PKGS = com.sun.javadoc
+
+DOCLETAPI_PKGS = jdk.javadoc.doclet \
+    jdk.javadoc.doclet.taglet
 
 TAGLETAPI_FILE = com/sun/tools/doclets/Taglet.java
 
--- a/modules.xml	Thu Jan 28 19:42:10 2016 +0300
+++ b/modules.xml	Thu Nov 12 13:26:07 2015 -0800
@@ -2,7 +2,7 @@
 
 <!--
 
-   Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+   Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
    DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 
    This code is free software; you can redistribute it and/or modify it
@@ -1643,6 +1643,10 @@
       <to>jdk.javadoc</to>
       <to>jdk.jdeps</to>
     </export>
+    <export>
+      <name>com.sun.tools.javac.model</name>
+      <to>jdk.javadoc</to>
+    </export>
   </module>
   <module>
     <name>jdk.crypto.ec</name>
@@ -1772,6 +1776,12 @@
     <export>
       <name>com.sun.tools.javadoc</name>
     </export>
+    <export>
+      <name>jdk.javadoc.doclet</name>  
+    </export>
+    <export>
+      <name>jdk.javadoc.doclet.taglet</name>  
+    </export>
   </module>
   <module>
     <name>jdk.jcmd</name>