summaryrefslogtreecommitdiffstats
path: root/o3d/documentation/jsdoc-toolkit-templates/publish.js
diff options
context:
space:
mode:
authorgman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-20 19:21:35 +0000
committergman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-20 19:21:35 +0000
commit756ac71a81a5be5e4e1b23c2734b5631848fe0fc (patch)
tree68fbc1816ae4233f2258edc08ae3a0588393a477 /o3d/documentation/jsdoc-toolkit-templates/publish.js
parentd900c2c753c9eb478a0229a21b31983ce00cc5d7 (diff)
downloadchromium_src-756ac71a81a5be5e4e1b23c2734b5631848fe0fc.zip
chromium_src-756ac71a81a5be5e4e1b23c2734b5631848fe0fc.tar.gz
chromium_src-756ac71a81a5be5e4e1b23c2734b5631848fe0fc.tar.bz2
The compiled version of the o3djs libs WORK!
Sadly there is some really strange voodoo to make it work. util.js was using document.getElementsByTagName('script') and it was not returning all the scripts. Lots of dump() lines later the voodoo of calling document.getElementsByTagName('script').length (the length is important) in some place earlier in the code fixes the issue. Also, added the copyright to the compiled file Added parameter docs Review URL: http://codereview.chromium.org/159049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21085 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/documentation/jsdoc-toolkit-templates/publish.js')
-rw-r--r--o3d/documentation/jsdoc-toolkit-templates/publish.js37
1 files changed, 36 insertions, 1 deletions
diff --git a/o3d/documentation/jsdoc-toolkit-templates/publish.js b/o3d/documentation/jsdoc-toolkit-templates/publish.js
index 9070a1a..0899958 100644
--- a/o3d/documentation/jsdoc-toolkit-templates/publish.js
+++ b/o3d/documentation/jsdoc-toolkit-templates/publish.js
@@ -57,6 +57,7 @@ var g_outputMode;
var g_baseURL;
var g_topURL;
var g_templates = [];
+var g_o3dPropertyRE = /^(\w+)\s+(\w+)\s+/;
/**
* Called automatically by JsDoc Toolkit.
@@ -501,6 +502,40 @@ function getPropertyType(property) {
}
/**
+ * Gets the parameters for a class.
+ * Parameters are an o3d specific thing. We have to look for tags that
+ * start with @o3dparameter
+ * @param {!Symbol} symbol
+ */
+function getParameters(symbol) {
+ var params = [];
+ if (symbol.inheritsFrom.length) {
+ params = getParameters(getSymbol(symbol.inheritsFrom[0]));
+ }
+
+ var tags = symbol.comment.getTag('o3dparameter');
+ for (var ii = 0; ii < tags.length; ++ii) {
+ var tag = tags[ii];
+ var tagString = tag.toString();
+ var parts = tagString.match(g_o3dPropertyRE);
+ if (!parts) {
+ generateError('Malformed o3dparameter specification for ' + symbol.alias +
+ ' : "' + tag + '"');
+ } else {
+ var descString = tagString.substr(parts[0].length);
+ var param = {
+ name: parts[1],
+ type: 'o3d.' + parts[2],
+ desc: descString,
+ parent: symbol.alias,
+ };
+ params.push(param);
+ }
+ }
+ return params;
+}
+
+/**
* Converts [ to [[] for ezt files.
* Also converts '\n\n' to <br/></br>
* @param {string} str to sanitize.
@@ -906,7 +941,7 @@ function getSourcePath(symbol) {
*/
function getParentName(symbol) {
var parent = getSymbol(symbol.memberOf);
- return parent.isNamespace ? symbol.memberOf : parent.name;
+ return parent.isNamespace ? symbol.memberOf : parent.alias;
}
/**