X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=JSDOC%2FBuildDocs.js;h=8c8552e39bd43923087604ce4316791c25743863;hb=4874ad3e1d08502e88986231f3de271795ca2302;hp=426ec5fd2560aa27e8e4847193abb1921a42aa37;hpb=96e6e7a96db9ae47349da1d1a2f53c2440bad60c;p=gnome.introspection-doc-generator diff --git a/JSDOC/BuildDocs.js b/JSDOC/BuildDocs.js index 426ec5f..8c8552e 100644 --- a/JSDOC/BuildDocs.js +++ b/JSDOC/BuildDocs.js @@ -416,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 => { @@ -426,7 +444,8 @@ BuildDocs = { var ret = { props : props, - events: events + events: events, + methods : methods, }; return ret; @@ -478,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(", ") + + ")"; } - };