summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Dirk Dougherty <nobody@android.com> 2009-05-01 11:19:55 -0700
committer The Android Open Source Project <initial-contribution@android.com> 2009-05-01 11:19:55 -0700
commitc521e266406d0393313e17ba29ae519315a5cf6e (patch)
treef78289cee430d8e9e6008b1b07603431b2d07e06
parent12741f56acf0a8a4feccea537d066ae6882499ce (diff)
AI 148186: Add support for using custom pdk templates. The make rule for pdk docs should set LOCAL_DROIDDOC_OPTIONS += -hdf android.whichdoc online-pdk
BUG=1646802 Automated import of CL 148186
-rw-r--r--tools/droiddoc/src/DocFile.java39
1 files changed, 23 insertions, 16 deletions
diff --git a/tools/droiddoc/src/DocFile.java b/tools/droiddoc/src/DocFile.java
index f53a35ce8c..b71c0816eb 100644
--- a/tools/droiddoc/src/DocFile.java
+++ b/tools/droiddoc/src/DocFile.java
@@ -115,23 +115,30 @@ public class DocFile
TagInfo.makeHDF(hdf, "root.descr", tags);
hdf.setValue("commentText", commentText);
-
- if (outfile.indexOf("sdk/") != -1) {
- hdf.setValue("sdk", "true");
- if (outfile.indexOf("index.html") != -1) {
- ClearPage.write(hdf, "sdkpage.cs", outfile);
- } else {
- ClearPage.write(hdf, "docpage.cs", outfile);
- }
- } else if (outfile.indexOf("guide/") != -1){
- hdf.setValue("guide", "true");
- ClearPage.write(hdf, "docpage.cs", outfile);
- } else if (outfile.indexOf("publish/") != -1){
- hdf.setValue("publish", "true");
+
+ // write the page using the appropriate root template, based on the
+ // whichdoc value supplied by build
+ String fromWhichmodule = hdf.getValue("android.whichmodule", "");
+ if (fromWhichmodule.equals("online-pdk")) {
+ //leaving this in just for temporary compatibility with pdk doc
+ hdf.setValue("online-pdk", "true");
+ // add any conditional login for root template here (such as
+ // for custom left nav based on tab etc.
ClearPage.write(hdf, "docpage.cs", outfile);
} else {
- ClearPage.write(hdf, "nosidenavpage.cs", outfile);
+ if (outfile.indexOf("sdk/") != -1) {
+ hdf.setValue("sdk", "true");
+ if (outfile.indexOf("index.html") != -1) {
+ ClearPage.write(hdf, "sdkpage.cs", outfile);
+ } else {
+ ClearPage.write(hdf, "docpage.cs", outfile);
+ }
+ } else if (outfile.indexOf("guide/") != -1) {
+ hdf.setValue("guide", "true");
+ ClearPage.write(hdf, "docpage.cs", outfile);
+ } else {
+ ClearPage.write(hdf, "nosidenavpage.cs", outfile);
+ }
}
- }
-
+ } //writePage
}