xultestrunner 0.2.9 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (162) hide show
  1. data/.document +5 -0
  2. data/.gitignore +4 -1
  3. data/LICENSE +17 -18
  4. data/README.rdoc +18 -0
  5. data/Rakefile +65 -40
  6. data/VERSION +1 -1
  7. data/bin/xultest +1 -12
  8. data/lib/xultestrunner.rb +1 -1
  9. data/test/test_helper.rb +9 -0
  10. data/test/xultestrunner_test.rb +7 -0
  11. data/xpcomcore/app/application.ini +12 -0
  12. data/xpcomcore/app/chrome/chrome.manifest +1 -0
  13. data/xpcomcore/app/chrome/content/xul/main_window.xul +6 -0
  14. data/xpcomcore/app/components/bootstrapper.js +70 -0
  15. data/xpcomcore/app/defaults/preferences/prefs.js +7 -0
  16. data/xultestrunner.gemspec +21 -150
  17. metadata +27 -153
  18. data/.gitmodules +0 -3
  19. data/README +0 -17
  20. data/xulapp/application.ini +0 -9
  21. data/xulapp/chrome/chrome.manifest +0 -2
  22. data/xulapp/chrome/content/interface/boot.xul +0 -20
  23. data/xulapp/chrome/content/interface/testharness.html +0 -30
  24. data/xulapp/chrome/content/lib/xultestcase.js +0 -140
  25. data/xulapp/chrome/content/lib/xultestrunner.js +0 -120
  26. data/xulapp/chrome/content/vendor/prototype/LICENSE +0 -16
  27. data/xulapp/chrome/content/vendor/prototype/prototype.js +0 -4874
  28. data/xulapp/chrome/content/vendor/scriptaculous/LICENSE +0 -20
  29. data/xulapp/chrome/content/vendor/scriptaculous/test.css +0 -90
  30. data/xulapp/chrome/content/vendor/scriptaculous/unittest.js +0 -566
  31. data/xulapp/chrome/content/vendor/xpcomcore/LICENSE +0 -21
  32. data/xulapp/chrome/content/vendor/xpcomcore/README +0 -27
  33. data/xulapp/chrome/content/vendor/xpcomcore/Rakefile +0 -83
  34. data/xulapp/chrome/content/vendor/xpcomcore/VERSION.yml +0 -5
  35. data/xulapp/chrome/content/vendor/xpcomcore/bootstrapper.js +0 -32
  36. data/xulapp/chrome/content/vendor/xpcomcore/components/XPCOMCore.js +0 -120
  37. data/xulapp/chrome/content/vendor/xpcomcore/doc/files.html +0 -241
  38. data/xulapp/chrome/content/vendor/xpcomcore/doc/index.html +0 -243
  39. data/xulapp/chrome/content/vendor/xpcomcore/doc/symbols/Error.html +0 -256
  40. data/xulapp/chrome/content/vendor/xpcomcore/doc/symbols/Kernel.html +0 -1030
  41. data/xulapp/chrome/content/vendor/xpcomcore/doc/symbols/LoadError.html +0 -319
  42. data/xulapp/chrome/content/vendor/xpcomcore/doc/symbols/SelfConceptError.html +0 -319
  43. data/xulapp/chrome/content/vendor/xpcomcore/doc/symbols/_global_.html +0 -316
  44. data/xulapp/chrome/content/vendor/xpcomcore/doc/symbols/src/lib_file.js.html +0 -53
  45. data/xulapp/chrome/content/vendor/xpcomcore/doc/symbols/src/lib_kernel.js.html +0 -251
  46. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/README.txt +0 -186
  47. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/frame/Chain.js +0 -102
  48. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/frame/Dumper.js +0 -144
  49. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/frame/Hash.js +0 -84
  50. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/frame/Link.js +0 -153
  51. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/frame/Namespace.js +0 -10
  52. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/frame/Opt.js +0 -134
  53. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/frame/Reflection.js +0 -26
  54. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/frame/String.js +0 -93
  55. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/frame/Testrun.js +0 -129
  56. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/frame.js +0 -33
  57. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/handlers/FOODOC.js +0 -26
  58. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/handlers/XMLDOC/DomReader.js +0 -159
  59. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/handlers/XMLDOC/XMLDoc.js +0 -16
  60. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/handlers/XMLDOC/XMLParse.js +0 -292
  61. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/handlers/XMLDOC.js +0 -26
  62. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/DocComment.js +0 -200
  63. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/DocTag.js +0 -294
  64. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/JsDoc.js +0 -126
  65. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/JsPlate.js +0 -109
  66. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/Lang.js +0 -144
  67. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/Parser.js +0 -145
  68. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/PluginManager.js +0 -33
  69. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/Symbol.js +0 -645
  70. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/SymbolSet.js +0 -241
  71. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/TextStream.js +0 -41
  72. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/Token.js +0 -18
  73. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/TokenReader.js +0 -332
  74. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/TokenStream.js +0 -133
  75. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/Util.js +0 -32
  76. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/Walker.js +0 -474
  77. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC.js +0 -104
  78. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/main.js +0 -111
  79. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/plugins/commentSrcJson.js +0 -20
  80. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/plugins/frameworkPrototype.js +0 -16
  81. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/plugins/functionCall.js +0 -10
  82. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/plugins/publishSrcHilite.js +0 -62
  83. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/plugins/symbolLink.js +0 -10
  84. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/plugins/tagParamConfig.js +0 -31
  85. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/plugins/tagSynonyms.js +0 -43
  86. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/run.js +0 -348
  87. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/t/TestDoc.js +0 -144
  88. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/t/runner.js +0 -13
  89. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/addon.js +0 -24
  90. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/anon_inner.js +0 -14
  91. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/augments.js +0 -31
  92. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/augments2.js +0 -26
  93. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/borrows.js +0 -46
  94. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/borrows2.js +0 -23
  95. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/config.js +0 -22
  96. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/constructs.js +0 -18
  97. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/encoding.js +0 -10
  98. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/encoding_other.js +0 -12
  99. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/event.js +0 -54
  100. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/exports.js +0 -14
  101. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/functions_anon.js +0 -39
  102. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/functions_nested.js +0 -33
  103. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/global.js +0 -13
  104. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/globals.js +0 -25
  105. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/ignore.js +0 -10
  106. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/inner.js +0 -16
  107. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/jsdoc_test.js +0 -477
  108. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/lend.js +0 -33
  109. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/memberof.js +0 -19
  110. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/memberof_constructor.js +0 -17
  111. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/module.js +0 -17
  112. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/name.js +0 -19
  113. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/namespace_nested.js +0 -23
  114. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/nocode.js +0 -13
  115. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/oblit_anon.js +0 -20
  116. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/overview.js +0 -20
  117. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/param_inline.js +0 -37
  118. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/params_optional.js +0 -8
  119. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/prototype.js +0 -17
  120. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/prototype_nested.js +0 -9
  121. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/prototype_oblit.js +0 -13
  122. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/prototype_oblit_constructor.js +0 -24
  123. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/public.js +0 -10
  124. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/scripts/code.js +0 -5
  125. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/scripts/notcode.txt +0 -5
  126. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/shared.js +0 -42
  127. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/shared2.js +0 -2
  128. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/shortcuts.js +0 -22
  129. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/static_this.js +0 -13
  130. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/synonyms.js +0 -31
  131. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/tosource.js +0 -23
  132. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/variable_redefine.js +0 -14
  133. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test.js +0 -325
  134. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/changes.txt +0 -96
  135. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/conf/sample.conf +0 -31
  136. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/java/build.xml +0 -36
  137. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/java/build_1.4.xml +0 -36
  138. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/java/classes/js.jar +0 -0
  139. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/java/src/JsDebugRun.java +0 -21
  140. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/java/src/JsRun.java +0 -21
  141. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/jsdebug.jar +0 -0
  142. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/jsrun.jar +0 -0
  143. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/jsrun.sh +0 -52
  144. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/allclasses.tmpl +0 -17
  145. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/allfiles.tmpl +0 -56
  146. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/class.tmpl +0 -646
  147. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/index.tmpl +0 -39
  148. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/publish.js +0 -200
  149. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/static/default.css +0 -162
  150. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/static/header.html +0 -2
  151. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/static/index.html +0 -19
  152. data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/symbol.tmpl +0 -35
  153. data/xulapp/chrome/content/vendor/xpcomcore/lib/file.js +0 -46
  154. data/xulapp/chrome/content/vendor/xpcomcore/lib/kernel.js +0 -244
  155. data/xulapp/chrome/content/vendor/xpcomcore/test/file_test.js +0 -16
  156. data/xulapp/chrome/content/vendor/xpcomcore/test/fixtures/love.js +0 -1
  157. data/xulapp/chrome/content/vendor/xpcomcore/test/fixtures/mad_love.js +0 -1
  158. data/xulapp/chrome/content/vendor/xpcomcore/test/fixtures/mad_world.js +0 -1
  159. data/xulapp/chrome/content/vendor/xpcomcore/test/fixtures/syntax_error.js +0 -1
  160. data/xulapp/chrome/content/vendor/xpcomcore/test/kernel_test.js +0 -88
  161. data/xulapp/components/bootstrap.js +0 -93
  162. data/xulapp/defaults/preferences/prefs.js +0 -14
@@ -1,104 +0,0 @@
1
- /**
2
- @overview
3
- @date $Date: 2009-06-21 23:36:33 +0100 (Sun, 21 Jun 2009) $
4
- @version $Revision: 801 $
5
- @location $HeadURL: https://jsdoc-toolkit.googlecode.com/svn/trunk/jsdoc-toolkit/app/lib/JSDOC.js $
6
- @name JSDOC.js
7
- */
8
-
9
- /**
10
- This is the main container for the JSDOC application.
11
- @namespace
12
- */
13
- JSDOC = {
14
- };
15
-
16
- /**
17
- @requires Opt
18
- */
19
- if (typeof arguments == "undefined") arguments = [];
20
- JSDOC.opt = Opt.get(
21
- arguments,
22
- {
23
- a: "allfunctions",
24
- c: "conf",
25
- d: "directory",
26
- "D[]": "define",
27
- e: "encoding",
28
- "E[]": "exclude",
29
- h: "help",
30
- n: "nocode",
31
- o: "out",
32
- p: "private",
33
- q: "quiet",
34
- r: "recurse",
35
- S: "securemodules",
36
- s: "suppress",
37
- t: "template",
38
- T: "testmode",
39
- u: "unique",
40
- v: "verbose",
41
- x: "ext"
42
- }
43
- );
44
-
45
- /** The current version string of this application. */
46
- JSDOC.VERSION = "2.3.0";
47
-
48
- /** Print out usage information and quit. */
49
- JSDOC.usage = function() {
50
- print("USAGE: java -jar jsrun.jar app/run.js [OPTIONS] <SRC_DIR> <SRC_FILE> ...");
51
- print("");
52
- print("OPTIONS:");
53
- print(" -a or --allfunctions\n Include all functions, even undocumented ones.\n");
54
- print(" -c or --conf\n Load a configuration file.\n");
55
- print(" -d=<PATH> or --directory=<PATH>\n Output to this directory (defaults to \"out\").\n");
56
- print(" -D=\"myVar:My value\" or --define=\"myVar:My value\"\n Multiple. Define a variable, available in JsDoc as JSDOC.opt.D.myVar.\n");
57
- print(" -e=<ENCODING> or --encoding=<ENCODING>\n Use this encoding to read and write files.\n");
58
- print(" -E=\"REGEX\" or --exclude=\"REGEX\"\n Multiple. Exclude files based on the supplied regex.\n");
59
- print(" -h or --help\n Show this message and exit.\n");
60
- print(" -n or --nocode\n Ignore all code, only document comments with @name tags.\n");
61
- print(" -o=<PATH> or --out=<PATH>\n Print log messages to a file (defaults to stdout).\n");
62
- print(" -p or --private\n Include symbols tagged as private, underscored and inner symbols.\n");
63
- print(" -q or --quiet\n Do not output any messages, not even warnings.\n");
64
- print(" -r=<DEPTH> or --recurse=<DEPTH>\n Descend into src directories.\n");
65
- print(" -s or --suppress\n Suppress source code output.\n");
66
- print(" -S or --securemodules\n Use Secure Modules mode to parse source code.\n");
67
- print(" -t=<PATH> or --template=<PATH>\n Required. Use this template to format the output.\n");
68
- print(" -T or --test\n Run all unit tests and exit.\n");
69
- print(" -u or --unique\n Force file names to be unique, but not based on symbol names.\n");
70
- print(" -v or --verbose\n Provide verbose feedback about what is happening.\n");
71
- print(" -x=<EXT>[,EXT]... or --ext=<EXT>[,EXT]...\n Scan source files with the given extension/s (defaults to js).\n");
72
-
73
- quit();
74
- }
75
-
76
- /*t:
77
- plan(4, "Testing JSDOC namespace.");
78
-
79
- is(
80
- typeof JSDOC,
81
- "object",
82
- "JSDOC.usage is a function."
83
- );
84
-
85
- is(
86
- typeof JSDOC.VERSION,
87
- "string",
88
- "JSDOC.VERSION is a string."
89
- );
90
-
91
- is(
92
- typeof JSDOC.usage,
93
- "function",
94
- "JSDOC.usage is a function."
95
- );
96
-
97
- is(
98
- typeof JSDOC.opt,
99
- "object",
100
- "JSDOC.opt is a object."
101
- );
102
- */
103
-
104
- if (this.IO) IO.includeDir("lib/JSDOC/");
@@ -1,111 +0,0 @@
1
- /**
2
- * @version $Id: main.js 795 2009-06-19 07:03:22Z micmath $
3
- */
4
-
5
- function main() {
6
- IO.include("lib/JSDOC.js");
7
- IO.includeDir("plugins/");
8
-
9
- // process the options
10
-
11
- // the -c option: options are defined in a configuration file
12
- if (JSDOC.opt.c) {
13
- eval("JSDOC.conf = " + IO.readFile(JSDOC.opt.c));
14
-
15
- LOG.inform("Using configuration file at '"+JSDOC.opt.c+"'.");
16
-
17
- for (var c in JSDOC.conf) {
18
- if (c !== "D" && !defined(JSDOC.opt[c])) { // commandline overrules config file
19
- JSDOC.opt[c] = JSDOC.conf[c];
20
- }
21
- }
22
-
23
- if (typeof JSDOC.conf["_"] != "undefined") {
24
- JSDOC.opt["_"] = JSDOC.opt["_"].concat(JSDOC.conf["_"]);
25
- }
26
-
27
- LOG.inform("With configuration: ");
28
- for (var o in JSDOC.opt) {
29
- LOG.inform(" "+o+": "+JSDOC.opt[o]);
30
- }
31
- }
32
-
33
- // be verbose
34
- if (JSDOC.opt.v) LOG.verbose = true;
35
-
36
- // send log messages to a file
37
- if (JSDOC.opt.o) LOG.out = IO.open(JSDOC.opt.o);
38
-
39
- // run the unit tests
40
- if (JSDOC.opt.T) {
41
- LOG.inform("JsDoc Toolkit running in test mode at "+new Date()+".");
42
- IO.include("frame/Testrun.js");
43
- IO.include("test.js");
44
- }
45
- else {
46
- // a template must be defined and must be a directory path
47
- if (!JSDOC.opt.t && System.getProperty("jsdoc.template.dir")) {
48
- JSDOC.opt.t = System.getProperty("jsdoc.template.dir");
49
- }
50
- if (JSDOC.opt.t && !JSDOC.opt.t.charAt(JSDOC.opt.t.length-1).match(/[\\\/]/)) {
51
- JSDOC.opt.t += SYS.slash;
52
- }
53
-
54
- // verbose messages about the options we were given
55
- LOG.inform("JsDoc Toolkit main() running at "+new Date()+".");
56
- LOG.inform("With options: ");
57
- for (var o in JSDOC.opt) {
58
- LOG.inform(" "+o+": "+JSDOC.opt[o]);
59
- }
60
-
61
- // initialize and build a symbolSet from your code
62
- JSDOC.JsDoc();
63
-
64
- // debugger's option: dump the entire symbolSet produced from your code
65
- if (JSDOC.opt.Z) {
66
- LOG.warn("So you want to see the data structure, eh? This might hang if you have circular refs...");
67
- IO.include("frame/Dumper.js");
68
- var symbols = JSDOC.JsDoc.symbolSet.toArray();
69
- for (var i = 0, l = symbols.length; i < l; i++) {
70
- var symbol = symbols[i];
71
- print("// symbol: " + symbol.alias);
72
- print(symbol.serialize());
73
- }
74
- }
75
- else {
76
- if (typeof JSDOC.opt.t != "undefined") {
77
- try {
78
- // a file named "publish.js" must exist in the template directory
79
- load(JSDOC.opt.t+"publish.js");
80
-
81
- // and must define a function named "publish"
82
- if (!publish) {
83
- LOG.warn("No publish() function is defined in that template so nothing to do.");
84
- }
85
- else {
86
- // which will be called with the symbolSet produced from your code
87
- publish(JSDOC.JsDoc.symbolSet);
88
- }
89
- }
90
- catch(e) {
91
- LOG.warn("Sorry, that doesn't seem to be a valid template: "+JSDOC.opt.t+"publish.js : "+e);
92
- }
93
- }
94
- else {
95
- LOG.warn("No template given. Might as well read the usage notes.");
96
- JSDOC.usage();
97
- }
98
- }
99
- }
100
-
101
- // notify of any warnings
102
- if (!JSDOC.opt.q && LOG.warnings.length) {
103
- print(LOG.warnings.length+" warning"+(LOG.warnings.length != 1? "s":"")+".");
104
- }
105
-
106
- // stop sending log messages to a file
107
- if (LOG.out) {
108
- LOG.out.flush();
109
- LOG.out.close();
110
- }
111
- }
@@ -1,20 +0,0 @@
1
- JSDOC.PluginManager.registerPlugin(
2
- "JSDOC.commentSrcJson",
3
- {
4
- onDocCommentSrc: function(comment) {
5
- var json;
6
- if (/^\s*@json\b/.test(comment)) {
7
- comment.src = new String(comment.src).replace("@json", "");
8
-
9
- eval("json = "+comment.src);
10
- var tagged = "";
11
- for (var i in json) {
12
- var tag = json[i];
13
- // todo handle cases where tag is an object
14
- tagged += "@"+i+" "+tag+"\n";
15
- }
16
- comment.src = tagged;
17
- }
18
- }
19
- }
20
- );
@@ -1,16 +0,0 @@
1
- JSDOC.PluginManager.registerPlugin(
2
- "JSDOC.frameworkPrototype",
3
- {
4
- onPrototypeClassCreate: function(classCreator) {
5
- var desc = "";
6
- if (classCreator.comment) {
7
- desc = classCreator.comment;
8
- }
9
- var insert = desc+"/** @name "+classCreator.name+"\n@constructor\n@scope "+classCreator.name+".prototype */"
10
-
11
- insert = insert.replace(/\*\/\/\*\*/g, "\n");
12
- /*DEBUG*///print("insert is "+insert);
13
- classCreator.addComment.data = insert;
14
- }
15
- }
16
- );
@@ -1,10 +0,0 @@
1
- JSDOC.PluginManager.registerPlugin(
2
- "JSDOC.functionCall",
3
- {
4
- onFunctionCall: function(functionCall) {
5
- if (functionCall.name == "dojo.define" && functionCall.arg1) {
6
- functionCall.doc = "/** @lends "+eval(functionCall.arg1)+".prototype */";
7
- }
8
- }
9
- }
10
- );
@@ -1,62 +0,0 @@
1
- JSDOC.PluginManager.registerPlugin(
2
- "JSDOC.publishSrcHilite",
3
- {
4
- onPublishSrc: function(src) {
5
- if (src.path in JsHilite.cache) {
6
- return; // already generated src code
7
- }
8
- else JsHilite.cache[src.path] = true;
9
-
10
- try {
11
- var sourceCode = IO.readFile(src.path);
12
- }
13
- catch(e) {
14
- print(e.message);
15
- quit();
16
- }
17
-
18
- var hiliter = new JsHilite(sourceCode, src.charset);
19
- src.hilited = hiliter.hilite();
20
- }
21
- }
22
- );
23
-
24
- function JsHilite(src, charset) {
25
-
26
- var tr = new JSDOC.TokenReader();
27
-
28
- tr.keepComments = true;
29
- tr.keepDocs = true;
30
- tr.keepWhite = true;
31
-
32
- this.tokens = tr.tokenize(new JSDOC.TextStream(src));
33
-
34
- // TODO is redefining toString() the best way?
35
- JSDOC.Token.prototype.toString = function() {
36
- return "<span class=\""+this.type+"\">"+this.data.replace(/</g, "&lt;")+"</span>";
37
- }
38
-
39
- if (!charset) charset = "utf-8";
40
-
41
- this.header = '<html><head><meta http-equiv="content-type" content="text/html; charset='+charset+'"> '+
42
- "<style>\n\
43
- .KEYW {color: #933;}\n\
44
- .COMM {color: #bbb; font-style: italic;}\n\
45
- .NUMB {color: #393;}\n\
46
- .STRN {color: #393;}\n\
47
- .REGX {color: #339;}\n\
48
- .line {border-right: 1px dotted #666; color: #666; font-style: normal;}\n\
49
- </style></head><body><pre>";
50
- this.footer = "</pre></body></html>";
51
- this.showLinenumbers = true;
52
- }
53
-
54
- JsHilite.cache = {};
55
-
56
- JsHilite.prototype.hilite = function() {
57
- var hilited = this.tokens.join("");
58
- var line = 1;
59
- if (this.showLinenumbers) hilited = hilited.replace(/(^|\n)/g, function(m){return m+"<span class='line'>"+((line<10)? " ":"")+((line<100)? " ":"")+(line++)+"</span> "});
60
-
61
- return this.header+hilited+this.footer;
62
- }
@@ -1,10 +0,0 @@
1
- JSDOC.PluginManager.registerPlugin(
2
- "JSDOC.symbolLink",
3
- {
4
- onSymbolLink: function(link) {
5
- // modify link.linkPath (the href part of the link)
6
- // or link.linkText (the text displayed)
7
- // or link.linkInner (the #name part of the link)
8
- }
9
- }
10
- );
@@ -1,31 +0,0 @@
1
- JSDOC.PluginManager.registerPlugin(
2
- "JSDOC.tagParamConfig",
3
- {
4
- onDocCommentTags: function(comment) {
5
- var currentParam = null;
6
- var tags = comment.tags;
7
- for (var i = 0, l = tags.length; i < l; i++) {
8
-
9
- if (tags[i].title == "param") {
10
- if (tags[i].name.indexOf(".") == -1) {
11
- currentParam = i;
12
- }
13
- }
14
- else if (tags[i].title == "config") {
15
- tags[i].title = "param";
16
- if (currentParam == null) {
17
- tags[i].name = "arguments"+"."+tags[i].name;
18
- }
19
- else if (tags[i].name.indexOf(tags[currentParam].name+".") != 0) {
20
- tags[i].name = tags[currentParam].name+"."+tags[i].name;
21
- }
22
- currentParam != null
23
- //tags[currentParam].properties.push(tags[i]);
24
- }
25
- else {
26
- currentParam = null;
27
- }
28
- }
29
- }
30
- }
31
- );
@@ -1,43 +0,0 @@
1
- JSDOC.PluginManager.registerPlugin(
2
- "JSDOC.tagSynonyms",
3
- {
4
- onDocCommentSrc: function(comment) {
5
- comment.src = comment.src.replace(/@methodOf\b/i, "@function\n@memberOf");
6
- comment.src = comment.src.replace(/@fieldOf\b/i, "@field\n@memberOf");
7
- },
8
-
9
- onDocCommentTags: function(comment) {
10
- for (var i = 0, l = comment.tags.length; i < l; i++) {
11
- var title = comment.tags[i].title.toLowerCase();
12
- var syn;
13
- if ((syn = JSDOC.tagSynonyms.synonyms["="+title])) {
14
- comment.tags[i].title = syn;
15
- }
16
- }
17
- }
18
- }
19
- );
20
-
21
- new Namespace(
22
- "JSDOC.tagSynonyms",
23
- function() {
24
- JSDOC.tagSynonyms.synonyms = {
25
- "=member": "memberOf",
26
- "=memberof": "memberOf",
27
- "=description": "desc",
28
- "=exception": "throws",
29
- "=argument": "param",
30
- "=returns": "return",
31
- "=classdescription": "class",
32
- "=fileoverview": "overview",
33
- "=extends": "augments",
34
- "=base": "augments",
35
- "=projectdescription": "overview",
36
- "=classdescription": "class",
37
- "=link": "see",
38
- "=borrows": "inherits",
39
- "=scope": "lends",
40
- "=construct": "constructor"
41
- }
42
- }
43
- );