am 0ee89a72: DO NOT MERGE - Back port change from master that enforces correctness in the javadoc comments.
Merge commit '0ee89a72d50ff4bc5c7d2a285cd799d3a8b48efb' into gingerbread-plus-aosp
* commit '0ee89a72d50ff4bc5c7d2a285cd799d3a8b48efb':
DO NOT MERGE - Back port change from master that enforces correctness in the javadoc comments.
diff --git a/tools/droiddoc/src/Comment.java b/tools/droiddoc/src/Comment.java
index 553cdf2..f49be8f 100644
--- a/tools/droiddoc/src/Comment.java
+++ b/tools/droiddoc/src/Comment.java
@@ -334,8 +334,17 @@
{
isHidden();
isDocOnly();
- parseRegex(mText);
- parseBriefTags();
+
+ // Don't bother parsing text if we aren't generating documentation.
+ if (DroidDoc.parseComments()) {
+ parseRegex(mText);
+ parseBriefTags();
+ } else {
+ // Forces methods to be recognized by findOverriddenMethods in MethodInfo.
+ mInlineTagsList.add(new TextTagInfo("Text", "Text", mText,
+ SourcePositionInfo.add(mPosition, mText, 0)));
+ }
+
mText = null;
mInitialized = true;
diff --git a/tools/droiddoc/src/DroidDoc.java b/tools/droiddoc/src/DroidDoc.java
index deb6910..57d78fb 100644
--- a/tools/droiddoc/src/DroidDoc.java
+++ b/tools/droiddoc/src/DroidDoc.java
@@ -59,6 +59,17 @@
public static String title = "";
public static SinceTagger sinceTagger = new SinceTagger();
+ private static boolean parseComments = false;
+ private static boolean generateDocs = true;
+
+ /**
+ * Returns true if we should parse javadoc comments,
+ * reporting errors in the process.
+ */
+ public static boolean parseComments() {
+ return generateDocs || parseComments;
+ }
+
public static boolean checkLevel(int level)
{
return (showLevel & level) == level;
@@ -96,7 +107,6 @@
String stubsDir = null;
//Create the dependency graph for the stubs directory
boolean apiXML = false;
- boolean noDocs = false;
boolean offlineMode = false;
String apiFile = null;
String debugStubsFile = "";
@@ -191,7 +201,10 @@
apiFile = a[1];
}
else if (a[0].equals("-nodocs")) {
- noDocs = true;
+ generateDocs = false;
+ }
+ else if (a[0].equals("-parsecomments")) {
+ parseComments = true;
}
else if (a[0].equals("-since")) {
sinceTagger.addVersion(a[1], a[2]);
@@ -209,7 +222,7 @@
// Set up the data structures
Converter.makeInfo(r);
- if (!noDocs) {
+ if (generateDocs) {
long startTime = System.nanoTime();
// Apply @since tags from the XML file