diff options
author | gman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-20 19:21:35 +0000 |
---|---|---|
committer | gman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-20 19:21:35 +0000 |
commit | 756ac71a81a5be5e4e1b23c2734b5631848fe0fc (patch) | |
tree | 68fbc1816ae4233f2258edc08ae3a0588393a477 /o3d/documentation/jsdoc-toolkit-templates | |
parent | d900c2c753c9eb478a0229a21b31983ce00cc5d7 (diff) | |
download | chromium_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')
-rw-r--r-- | o3d/documentation/jsdoc-toolkit-templates/class.tmpl | 47 | ||||
-rw-r--r-- | o3d/documentation/jsdoc-toolkit-templates/publish.js | 37 |
2 files changed, 80 insertions, 4 deletions
diff --git a/o3d/documentation/jsdoc-toolkit-templates/class.tmpl b/o3d/documentation/jsdoc-toolkit-templates/class.tmpl index 1f30c40..2ebc03a 100644 --- a/o3d/documentation/jsdoc-toolkit-templates/class.tmpl +++ b/o3d/documentation/jsdoc-toolkit-templates/class.tmpl @@ -83,7 +83,6 @@ thisClass = data; </table> </if> - <!-- ========== METHOD SUMMARY =========== --> <if test="thisClass.methods.length"> {! var ownMethods = data.methods.sort(makeSortby("name")); !} @@ -105,7 +104,7 @@ thisClass = data; </if> </if> -<!-- =========== FIELD SUMMARY =========== --> +<!-- =========== PROPERTY SUMMARY =========== --> {! var ownProperties = getPublicProperties(data).sort(makeSortby("name")); !} <if test="ownProperties.length"> <h2>Public Properties</h2> @@ -123,7 +122,22 @@ thisClass = data; </table> </if> -<!-- =========== END FIELD SUMMARY =========== --> +<!-- ========== PARAMETER SUMMARY =========== --> +{! var ownParameters = getParameters(data); !} +<if test="ownParameters.length"> + <h2>Parameters</h2> + <table class="summary"> + <for each="param" in="ownParameters"> + <tr> + <td class="type"> + {+linkifyTypeSpec(makeName('[Param Summary]', thisClass.alias, param.name), param.type)+} + </td> + <td><a class="el" href="#param_{+param.name+}">{+param.name+}</a></td> + <td>{+linkifySingleType(makeName('[Param Summary inherit]'), param.parent)+}</td> + </tr> + </for> + </table> +</if> <!-- ========== CONSTRUCTOR DETAIL ============== --> <if test="shouldWriteConstructor(data)"> @@ -352,6 +366,33 @@ thisClass = data; </for> </if> +<!-- =========== PARAMETER DETAIL ============== --> + +<if test="defined(ownParameters) && ownParameters.length"> + <hr/> + <h2>Parameter Documentation</h2> + <for each="param" in="ownParameters"> + <a class="anchor" name="param_{+param.name+}"></a> + <div class="memitem"> + <div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">{+linkifyTypeSpec(makeName('[Param Detail]', thisClass.alias, param.name), param.type)+} {+param.name+} + {+ (param.parent == thisClass.alias) ? "" : ("[[]inherited from " + linkifySingleType(makeName('[Param Details inherit]'), param.parent) + "]") +} + </td> + </tr> + </table> + </div> + + <div class="memdoc"> + <p/> + {+sanitizeForEZT(param.desc)+} + </div> + + </div> + </for> +</if> + </div><!-- end contents --> </div><!-- end doxygen-ref --> 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; } /** |