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

changeset 2023
cf37c3775397
parent 1985
0e6577980181
child 2071
2c24a04ebfb4
     1.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDoclet.java	Wed Sep 11 08:30:58 2013 -0400
     1.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDoclet.java	Wed Sep 11 14:50:11 2013 -0700
     1.3 @@ -205,13 +205,20 @@
     1.4       * {@inheritDoc}
     1.5       */
     1.6      protected void generateProfileFiles() throws Exception {
     1.7 -        if (configuration.showProfiles) {
     1.8 +        if (configuration.showProfiles && configuration.profilePackages.size() > 0) {
     1.9              ProfileIndexFrameWriter.generate(configuration);
    1.10              Profile prevProfile = null, nextProfile;
    1.11 +            String profileName;
    1.12              for (int i = 1; i < configuration.profiles.getProfileCount(); i++) {
    1.13 -                ProfilePackageIndexFrameWriter.generate(configuration, Profile.lookup(i).name);
    1.14 +                profileName = Profile.lookup(i).name;
    1.15 +                // Generate profile package pages only if there are any packages
    1.16 +                // in a profile to be documented. The profilePackages map will not
    1.17 +                // contain an entry for the profile if there are no packages to be documented.
    1.18 +                if (!configuration.shouldDocumentProfile(profileName))
    1.19 +                    continue;
    1.20 +                ProfilePackageIndexFrameWriter.generate(configuration, profileName);
    1.21                  PackageDoc[] packages = configuration.profilePackages.get(
    1.22 -                        Profile.lookup(i).name);
    1.23 +                        profileName);
    1.24                  PackageDoc prev = null, next;
    1.25                  for (int j = 0; j < packages.length; j++) {
    1.26                      // if -nodeprecated option is set and the package is marked as

mercurial