diff options
author | Bill Napier <napier@google.com> | 2010-08-19 22:46:43 -0700 |
---|---|---|
committer | Bill Napier <napier@google.com> | 2010-08-19 22:46:43 -0700 |
commit | 24efb4848a4cbe16fba84004f9fb999f1497fa3c (patch) | |
tree | c78e93051ffc4939ed50c8b1418a8b6fd58f97f0 | |
parent | bee24b884b4f53cc55ed544d5dfc3da381ad5970 (diff) | |
download | sdk-24efb4848a4cbe16fba84004f9fb999f1497fa3c.zip sdk-24efb4848a4cbe16fba84004f9fb999f1497fa3c.tar.gz sdk-24efb4848a4cbe16fba84004f9fb999f1497fa3c.tar.bz2 |
sdk-docs output format for use in generating the SDK documentation for MonkeyRunner.
Change-Id: Iaf8cb5273d025983e62cca6ab092dca9e97c331a
-rw-r--r-- | monkeyrunner/scripts/help.py | 2 | ||||
-rw-r--r-- | monkeyrunner/src/com/android/monkeyrunner/MonkeyRunnerHelp.java | 2 | ||||
-rw-r--r-- | monkeyrunner/src/resources/com/android/monkeyrunner/sdk-docs.cs | 28 |
3 files changed, 30 insertions, 2 deletions
diff --git a/monkeyrunner/scripts/help.py b/monkeyrunner/scripts/help.py index 832d2cb..ebc6c10 100644 --- a/monkeyrunner/scripts/help.py +++ b/monkeyrunner/scripts/help.py @@ -17,7 +17,7 @@ from com.android.monkeyrunner import MonkeyRunner as mr import os import sys -supported_formats = ['html', 'text'] +supported_formats = ['html', 'text', 'sdk-docs'] if len(sys.argv) != 3: print 'help.py: format output' diff --git a/monkeyrunner/src/com/android/monkeyrunner/MonkeyRunnerHelp.java b/monkeyrunner/src/com/android/monkeyrunner/MonkeyRunnerHelp.java index 5642788..124e6cf 100644 --- a/monkeyrunner/src/com/android/monkeyrunner/MonkeyRunnerHelp.java +++ b/monkeyrunner/src/com/android/monkeyrunner/MonkeyRunnerHelp.java @@ -141,7 +141,7 @@ public final class MonkeyRunnerHelp { JSilver jsilver = new JSilver(resourceLoader); // Quick check for support formats - if ("html".equals(format) || "text".equals(format)) { + if ("html".equals(format) || "text".equals(format) || "sdk-docs".equals(format)) { try { Data hdf = buildHelpHdf(jsilver); return jsilver.render(format + ".cs", hdf); diff --git a/monkeyrunner/src/resources/com/android/monkeyrunner/sdk-docs.cs b/monkeyrunner/src/resources/com/android/monkeyrunner/sdk-docs.cs new file mode 100644 index 0000000..b4be1fe --- /dev/null +++ b/monkeyrunner/src/resources/com/android/monkeyrunner/sdk-docs.cs @@ -0,0 +1,28 @@ +page.title=UI/Application Exerciser Monkey API +@jd:body + +<h2>MonkeyRunner Help<h2> +<h3>Table of Contents</h3> +<ul> +<?cs each:item = help ?> +<li><a href="#<?cs name:item ?>"><?cs var:item.name ?></a></li> +<?cs /each ?> +</ul> +<?cs each:item = help ?> +<h3><a name="<?cs name:item ?>"><?cs var:item.name ?></a></h3> + <?cs each:docpara = item.doc ?> + <p><?cs var:docpara ?></p> + <?cs /each ?> + <?cs if:subcount(item.argument) ?> +<h4>Args</h4> +<ul> + <?cs each:arg = item.argument ?> + <li><?cs var:arg.name ?> - <?cs each:argdocpara = arg.doc ?><?cs var:argdocpara ?> <?cs /each ?> + <?cs /each ?> +</ul> +<h4>Returns</h4> +<p><?cs each:retdocpara = item.returns ?><?cs var:retdocpara ?> <?cs /each ?></p> +<?cs /if ?> +<?cs /each ?> +</body> +</html> |