src/share/classes/com/sun/tools/doclets/formats/html/SourceToHTMLConverter.java

changeset 995
62bc3775d5bb
parent 910
ebf7c13df6c0
child 1359
25e14ad23cef
     1.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/SourceToHTMLConverter.java	Sat Apr 30 16:57:18 2011 -0700
     1.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/SourceToHTMLConverter.java	Mon May 02 02:13:02 2011 -0700
     1.3 @@ -82,12 +82,20 @@
     1.4          }
     1.5          PackageDoc[] pds = rd.specifiedPackages();
     1.6          for (int i = 0; i < pds.length; i++) {
     1.7 -            convertPackage(configuration, pds[i], outputdir);
     1.8 +            // If -nodeprecated option is set and the package is marked as deprecated,
     1.9 +            // do not convert the package files to HTML.
    1.10 +            if (!(configuration.nodeprecated && Util.isDeprecated(pds[i])))
    1.11 +                convertPackage(configuration, pds[i], outputdir);
    1.12          }
    1.13          ClassDoc[] cds = rd.specifiedClasses();
    1.14          for (int i = 0; i < cds.length; i++) {
    1.15 -            convertClass(configuration, cds[i],
    1.16 -                    getPackageOutputDir(outputdir, cds[i].containingPackage()));
    1.17 +            // If -nodeprecated option is set and the class is marked as deprecated
    1.18 +            // or the containing package is deprecated, do not convert the
    1.19 +            // package files to HTML.
    1.20 +            if (!(configuration.nodeprecated &&
    1.21 +                    (Util.isDeprecated(cds[i]) || Util.isDeprecated(cds[i].containingPackage()))))
    1.22 +                convertClass(configuration, cds[i],
    1.23 +                        getPackageOutputDir(outputdir, cds[i].containingPackage()));
    1.24          }
    1.25      }
    1.26  
    1.27 @@ -106,7 +114,12 @@
    1.28          String classOutputdir = getPackageOutputDir(outputdir, pd);
    1.29          ClassDoc[] cds = pd.allClasses();
    1.30          for (int i = 0; i < cds.length; i++) {
    1.31 -            convertClass(configuration, cds[i], classOutputdir);
    1.32 +            // If -nodeprecated option is set and the class is marked as deprecated,
    1.33 +            // do not convert the package files to HTML. We do not check for
    1.34 +            // containing package deprecation since it is already check in
    1.35 +            // the calling method above.
    1.36 +            if (!(configuration.nodeprecated && Util.isDeprecated(cds[i])))
    1.37 +                convertClass(configuration, cds[i], classOutputdir);
    1.38          }
    1.39      }
    1.40  

mercurial