Adding version information to DroidDoc. Rather than pulling the version from

@since tags in the code, it's pulled from the API XML files also used by
apicheck.

The code now reads the apicheck XML, and applies it's versions to the DroidDoc
class models. The models output the version to HDF, and that's picked up by
the CS templates.

The clearsilver templates will be changed to be pretty in a follow up change.

Conflicts:
	tools/droiddoc/src/DroidDoc.java
This commit is contained in:
Jesse Wilson
2009-07-21 14:02:14 -07:00
parent 70a76816e5
commit 289d80eee4
18 changed files with 317 additions and 78 deletions

View File

@@ -97,6 +97,7 @@ public class DroidDoc
String apiFile = null;
String debugStubsFile = "";
HashSet<String> stubPackages = null;
SinceTagger sinceTagger = new SinceTagger();
root = r;
@@ -186,6 +187,9 @@ public class DroidDoc
apiXML = true;
apiFile = a[1];
}
else if (a[0].equals("-since")) {
sinceTagger.addVersion(a[1], a[2]);
}
}
// read some prefs from the template
@@ -204,6 +208,9 @@ public class DroidDoc
TodoFile.writeTodoFile(todoFile);
}
// Apply @since tags from the XML file
sinceTagger.tagAll(Converter.rootClasses());
// HTML Pages
if (ClearPage.htmlDir != null) {
writeHTMLPages();
@@ -244,7 +251,7 @@ public class DroidDoc
if (stubsDir != null) {
Stubs.writeStubs(stubsDir, apiXML, apiFile, stubPackages);
}
if (sdkValuePath != null) {
writeSdkValues(sdkValuePath);
}
@@ -394,9 +401,12 @@ public class DroidDoc
if (option.equals("-apixml")) {
return 2;
}
if (option.equals("-since")) {
return 3;
}
return 0;
}
public static boolean validOptions(String[][] options, DocErrorReporter r)
{
for (String[] a: options) {
@@ -762,6 +772,7 @@ public class DroidDoc
String name = pkg.name();
data.setValue("package.name", name);
data.setValue("package.since", pkg.getSince());
data.setValue("package.descr", "...description...");
makeClassListHDF(data, "package.interfaces",