show full package description in the package summary and remove the separate description page
Change-Id: Ib443473f54d768765041be0c969fa8b2f9637c57
diff --git a/res/assets/templates/assets/doclava-developer-docs.js b/res/assets/templates/assets/doclava-developer-docs.js
index 79f1ddb..4e7935d 100644
--- a/res/assets/templates/assets/doclava-developer-docs.js
+++ b/res/assets/templates/assets/doclava-developer-docs.js
@@ -150,7 +150,7 @@
devdocNav = $("#devdoc-nav");
var cookiePath = getSection() + "_";
-
+
if (!isMobile) {
$("#resize-packages-nav").resizable({handles: "s", resize: function(e, ui) { resizePackagesHeight(); } });
$(".side-nav-resizable").resizable({handles: "e", resize: function(e, ui) { resizeWidth(); } });
@@ -518,4 +518,4 @@
button.removeClass("hide").addClass("show");
}
$("span", button).toggle();
-}
+}
\ No newline at end of file
diff --git a/res/assets/templates/assets/style.css b/res/assets/templates/assets/style.css
index 5ad1118..eecbb87 100644
--- a/res/assets/templates/assets/style.css
+++ b/res/assets/templates/assets/style.css
@@ -202,9 +202,6 @@
font-size: 120%;
}
-div#jd-content .jd-more {
-}
-
div#jd-content .jd-descr {
padding-top: 0;
}
diff --git a/res/assets/templates/package-descr.cs b/res/assets/templates/package-descr.cs
deleted file mode 100644
index beb01c9..0000000
--- a/res/assets/templates/package-descr.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-<?cs include:"doctype.cs" ?>
-<?cs include:"macros.cs" ?>
-<html>
-<?cs include:"head_tag.cs" ?>
-<body class="<?cs var:package.since ?>">
-<?cs include:"header.cs" ?>
-
-<div class="g-unit" id="doc-content">
-
-<div id="api-info-block">
-<div class="api-level">
- <?cs call:since_tags(package) ?>
- <?cs call:federated_refs(package) ?>
-</div>
-</div>
-
-<div id="jd-header">
- package
- <h1><?cs var:package.name ?></b></h1>
- <div class="jd-nav">
- <a class="jd-navlink" href="package-summary.html">Classes</a> | Description
- </div>
-</div><!-- end header -->
-
-<div id="naMessage"></div>
-
-<div id="jd-content" class="api apilevel-<?cs var:package.since ?>">
-<div class="jd-descr">
-<p><?cs call:tag_list(package.descr) ?></p>
-</div>
-
-<?cs include:"footer.cs" ?>
-</div><!-- end jd-content -->
-</div> <!-- end doc-content -->
-
-<?cs include:"trailer.cs" ?>
-
-</body>
-</html>
diff --git a/res/assets/templates/package.cs b/res/assets/templates/package.cs
index bb53cee..9cc19cb 100644
--- a/res/assets/templates/package.cs
+++ b/res/assets/templates/package.cs
@@ -17,27 +17,21 @@
<div id="jd-header">
package
<h1><?cs var:package.name ?></h1>
- <div class="jd-nav">
- <?cs if:subcount(package.shortDescr) ?>
- Classes | <a class="jd-navlink" href="package-descr.html">Description</a>
- <?cs /if ?>
- </div>
</div><!-- end header -->
<div id="naMessage"></div>
<div id="jd-content" class="api apilevel-<?cs var:package.since ?>">
-<?cs if:subcount(package.shortDescr) ?>
+<?cs if:subcount(package.descr) ?>
<div class="jd-descr">
- <p><?cs call:tag_list(package.shortDescr) ?></p>
- <p><span class="jd-more"><a href="package-descr.html">more...</a></span></p>
+ <?cs call:tag_list(package.descr) ?>
</div>
<?cs /if ?>
<?cs def:class_table(label, classes) ?>
<?cs if:subcount(classes) ?>
- <h3><?cs var:label ?></h3>
+ <h2><?cs var:label ?></h2>
<div class="jd-sumtable">
<?cs call:class_link_table(classes) ?>
</div>
diff --git a/src/com/google/doclava/Doclava.java b/src/com/google/doclava/Doclava.java
index 3b5234e..f8c1544 100644
--- a/src/com/google/doclava/Doclava.java
+++ b/src/com/google/doclava/Doclava.java
@@ -76,13 +76,13 @@
public static FederationTagger federationTagger = new FederationTagger();
private static boolean generateDocs = true;
private static boolean parseComments = false;
-
+
public static JSilver jSilver = null;
public static boolean checkLevel(int level) {
return (showLevel & level) == level;
}
-
+
/**
* Returns true if we should parse javadoc comments,
* reporting errors in the process.
@@ -247,7 +247,7 @@
// Apply @since tags from the XML file
sinceTagger.tagAll(Converter.rootClasses());
-
+
// Apply details of federated documentation
federationTagger.tagAll(Converter.rootClasses());
@@ -309,7 +309,7 @@
}
Errors.printErrors();
-
+
return !Errors.hadError;
}
@@ -762,7 +762,7 @@
/**
* Writes the list of classes that must be present in order to provide the non-hidden APIs known
* to javadoc.
- *
+ *
* @param filename the path to the file to write the list to
*/
public static void writeKeepList(String filename) {
@@ -914,10 +914,6 @@
setPageTitle(data, name);
ClearPage.write(data, "package.cs", filename);
- filename = pkg.fullDescriptionHtmlPage();
- setPageTitle(data, name + " Details");
- ClearPage.write(data, "package-descr.cs", filename);
-
Proofread.writePackage(filename, pkg.inlineTags());
}
@@ -978,18 +974,18 @@
/*
* public static void writeKeywords() { ArrayList<KeywordEntry> keywords = new
* ArrayList<KeywordEntry>();
- *
+ *
* ClassInfo[] classes = PackageInfo.filterHidden(Converter.convertClasses(root.classes()));
- *
+ *
* for (ClassInfo cl: classes) { cl.makeKeywordEntries(keywords); }
- *
+ *
* HDF data = makeHDF();
- *
+ *
* Collections.sort(keywords);
- *
+ *
* int i=0; for (KeywordEntry entry: keywords) { String base = "keywords." + entry.firstChar() +
* "." + i; entry.makeHDF(data, base); i++; }
- *
+ *
* setPageTitle(data, "Index"); ClearPage.write(data, "keywords.cs", javadocDir + "keywords" +
* htmlExtension); }
*/
@@ -1195,7 +1191,7 @@
/**
* Collect the values used by the Dev tools and write them in files packaged with the SDK
- *
+ *
* @param output the ouput directory for the files.
*/
private static void writeSdkValues(String output) {
@@ -1323,7 +1319,7 @@
/**
* Writes a list of values into a text files.
- *
+ *
* @param pathname the absolute os path of the output file.
* @param values the list of values to write.
*/
@@ -1355,7 +1351,7 @@
/**
* Writes the widget/layout/layout param classes into a text files.
- *
+ *
* @param pathname the absolute os path of the output file.
* @param widgets the list of widget classes to write.
* @param layouts the list of layout classes to write.
@@ -1397,7 +1393,7 @@
/**
* Writes a class name and its super class names into a {@link BufferedWriter}.
- *
+ *
* @param writer the BufferedWriter to write into
* @param clazz the class to write
* @param prefix the prefix to put at the beginning of the line.
@@ -1422,7 +1418,7 @@
* <code>android.view.ViewGroup$LayoutParams</code></li>
* <li>{@link #TYPE_NONE}: in all other cases</li>
* </ul>
- *
+ *
* @param clazz the {@link ClassInfo} to check.
*/
private static int checkInheritance(ClassInfo clazz) {
diff --git a/src/com/google/doclava/NavTree.java b/src/com/google/doclava/NavTree.java
index 5c3e53d..db4adc0 100644
--- a/src/com/google/doclava/NavTree.java
+++ b/src/com/google/doclava/NavTree.java
@@ -49,8 +49,6 @@
private static Node makePackageNode(PackageInfo pkg) {
List<Node> children = new ArrayList<Node>();
- children.add(new Node("Description", pkg.fullDescriptionHtmlPage(), null, null));
-
addClassNodes(children, "Interfaces", pkg.interfaces());
addClassNodes(children, "Classes", pkg.ordinaryClasses());
addClassNodes(children, "Enums", pkg.enums());
diff --git a/src/com/google/doclava/PackageInfo.java b/src/com/google/doclava/PackageInfo.java
index 7651b5c..617845d 100644
--- a/src/com/google/doclava/PackageInfo.java
+++ b/src/com/google/doclava/PackageInfo.java
@@ -23,7 +23,7 @@
public class PackageInfo extends DocInfo implements ContainerInfo {
public static final String DEFAULT_PACKAGE = "default package";
-
+
public static final Comparator<PackageInfo> comparator = new Comparator<PackageInfo>() {
public int compare(PackageInfo a, PackageInfo b) {
return a.name().compareTo(b.name());
@@ -40,15 +40,15 @@
mPackage = pkg;
}
-
+
public PackageInfo(String name) {
super("", null);
mName = name;
}
-
+
public PackageInfo(String name, SourcePositionInfo position) {
super("", position);
-
+
if (name.isEmpty()) {
mName = "default package";
} else {
@@ -64,14 +64,6 @@
return s;
}
- public String fullDescriptionHtmlPage() {
- String s = mName;
- s = s.replace('.', '/');
- s += "/package-descr.html";
- s = Doclava.javadocDir + s;
- return s;
- }
-
@Override
public ContainerInfo parent() {
return null;
@@ -185,10 +177,10 @@
private ClassInfo[] mEnums;
private ClassInfo[] mExceptions;
private ClassInfo[] mErrors;
-
+
// TODO: Leftovers from ApiCheck that should be better merged.
private HashMap<String, ClassInfo> mClasses = new HashMap<String, ClassInfo>();
-
+
public void addClass(ClassInfo cl) {
mClasses.put(cl.name(), cl);
}
@@ -196,7 +188,7 @@
public HashMap<String, ClassInfo> allClasses() {
return mClasses;
}
-
+
public boolean isConsistent(PackageInfo pInfo) {
boolean consistent = true;
for (ClassInfo cInfo : mClasses.values()) {