X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=JSDOC%2FBuildDocs.js;h=8c8552e39bd43923087604ce4316791c25743863;hb=4874ad3e1d08502e88986231f3de271795ca2302;hp=263b6ef471c978fb80d6afbdd8a5da39c20db0fd;hpb=cf51cc44e51968545cc173d47e8b18f1b3e1c257;p=gnome.introspection-doc-generator diff --git a/JSDOC/BuildDocs.js b/JSDOC/BuildDocs.js index 263b6ef..8c8552e 100644 --- a/JSDOC/BuildDocs.js +++ b/JSDOC/BuildDocs.js @@ -266,7 +266,7 @@ BuildDocs = { return ($.is("FILE")) } function isaClass($) { - return ($.is("CONSTRUCTOR") || $.isNamespace || $.isStatic); + return ($.is("CONSTRUCTOR") || $.isNamespace || $.isClass); } @@ -287,7 +287,7 @@ BuildDocs = { var targetDir = Options.target + "/symbols/src/"; this.makeSrcFile(file, targetDir); } - + //print(JSON.stringify(symbols,null,4)); var classes = symbols.filter(isaClass).sort(makeSortby("alias")); @@ -386,12 +386,17 @@ BuildDocs = { var p =''; for(var i =0; i < cfgProperties.length;i++) { p = cfgProperties[i]; - props.push( { + var add = { name : p.name, type : p.type, desc : p.desc, + memberOf : p.memberOf == data.alias ? '' : p.memberOf - }); + } + if (p.optvalues) { + add.optvals = p.optvalues; + } + props.push(add ); } @@ -411,6 +416,24 @@ BuildDocs = { desc : m.desc }); } + + var ownMethods = data.methods.filter( function(e){ + return !e.isEvent && !e.comment.getTag('hide').length; + }).sort(makeSortby("name")); + + + var methods = []; + + for(var i =0; i < ownMethods.length;i++) { + m = ownMethods[i]; + methods.push( { + name : m.name, + sig : this.makeMethodSkel(m.params), + type : 'function', + desc : m.desc + }); + } + //println(props.toSource()); // we need to output: //classname => { @@ -421,7 +444,8 @@ BuildDocs = { var ret = { props : props, - events: events + events: events, + methods : methods, }; return ret; @@ -473,8 +497,17 @@ BuildDocs = { } ).map( function($) { return $.name == 'this' ? '_self' : $.name; } ).join(", ") + ")\n{\n\n}"; + }, + makeMethodSkel :function(params) { + if (!params) return "()"; + return "(" + + params.filter( + function($) { + return $.name.indexOf(".") == -1; // don't show config params in signature + } + ).map( function($) { return $.type + " " +( $.name == 'this' ? '_self' : $.name ); } ).join(", ") + + ")"; } - };