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

changeset 1568
5f0731e4e5e6
parent 1417
522a1ee72340
child 1985
0e6577980181
     1.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDoclet.java	Wed Jan 16 12:00:21 2013 -0800
     1.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDoclet.java	Mon Jan 21 00:45:35 2013 -0500
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -28,6 +28,8 @@
    1.11  import java.util.*;
    1.12  
    1.13  import com.sun.javadoc.*;
    1.14 +import com.sun.tools.javac.sym.Profiles;
    1.15 +import com.sun.tools.javac.jvm.Profile;
    1.16  import com.sun.tools.doclets.internal.toolkit.*;
    1.17  import com.sun.tools.doclets.internal.toolkit.builders.*;
    1.18  import com.sun.tools.doclets.internal.toolkit.util.*;
    1.19 @@ -202,6 +204,44 @@
    1.20      /**
    1.21       * {@inheritDoc}
    1.22       */
    1.23 +    protected void generateProfileFiles() throws Exception {
    1.24 +        if (configuration.showProfiles) {
    1.25 +            ProfileIndexFrameWriter.generate(configuration);
    1.26 +            Profile prevProfile = null, nextProfile;
    1.27 +            for (int i = 1; i < configuration.profiles.getProfileCount(); i++) {
    1.28 +                ProfilePackageIndexFrameWriter.generate(configuration, Profile.lookup(i).name);
    1.29 +                PackageDoc[] packages = configuration.profilePackages.get(
    1.30 +                        Profile.lookup(i).name);
    1.31 +                PackageDoc prev = null, next;
    1.32 +                for (int j = 0; j < packages.length; j++) {
    1.33 +                    // if -nodeprecated option is set and the package is marked as
    1.34 +                    // deprecated, do not generate the profilename-package-summary.html
    1.35 +                    // and profilename-package-frame.html pages for that package.
    1.36 +                    if (!(configuration.nodeprecated && Util.isDeprecated(packages[j]))) {
    1.37 +                        ProfilePackageFrameWriter.generate(configuration, packages[j], i);
    1.38 +                        next = (j + 1 < packages.length
    1.39 +                                && packages[j + 1].name().length() > 0) ? packages[j + 1] : null;
    1.40 +                        AbstractBuilder profilePackageSummaryBuilder =
    1.41 +                                configuration.getBuilderFactory().getProfilePackageSummaryBuilder(
    1.42 +                                packages[j], prev, next, Profile.lookup(i));
    1.43 +                        profilePackageSummaryBuilder.build();
    1.44 +                        prev = packages[j];
    1.45 +                    }
    1.46 +                }
    1.47 +                nextProfile = (i + 1 < configuration.profiles.getProfileCount()) ?
    1.48 +                        Profile.lookup(i + 1) : null;
    1.49 +                AbstractBuilder profileSummaryBuilder =
    1.50 +                        configuration.getBuilderFactory().getProfileSummaryBuilder(
    1.51 +                        Profile.lookup(i), prevProfile, nextProfile);
    1.52 +                profileSummaryBuilder.build();
    1.53 +                prevProfile = Profile.lookup(i);
    1.54 +            }
    1.55 +        }
    1.56 +    }
    1.57 +
    1.58 +    /**
    1.59 +     * {@inheritDoc}
    1.60 +     */
    1.61      protected void generatePackageFiles(ClassTree classtree) throws Exception {
    1.62          PackageDoc[] packages = configuration.packages;
    1.63          if (packages.length > 1) {

mercurial