X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=DependTree%2FBuildLists.js;h=da200d54b94abb3b84c412f0bce4f540a1be099e;hb=119290bc3234e9ece1c64dbd72ca486d9633b5b7;hp=10924af81291eef20dac48cb19edb0757e6ce0bd;hpb=2fbd311a86d6982b15dafaaa14c2eb8636270693;p=app.Builder.js diff --git a/DependTree/BuildLists.js b/DependTree/BuildLists.js index 10924af81..da200d54b 100644 --- a/DependTree/BuildLists.js +++ b/DependTree/BuildLists.js @@ -68,10 +68,12 @@ function BuildLists () { var implementations = {}; var methods = {}; var allmethods = []; + var allchildren = []; + for (cls in classes) { var odata = classes[cls]; - methods[cls] = {} + //methods[cls] = {} implementations[odata.alias] = odata.titleType == 'Class' ? odata.childClasses : odata.implementedBy; //print(JSON.stringify(odata.methods,null,4)); @@ -84,18 +86,31 @@ function BuildLists () { } // now add it.. - var full_method_name = p.memberOf + '.' + p.type; - if (allmethods.indexOf(full_method_name) < 0) { - allmethods.push(full_method_name); + if (!p.type || typeof(classes[p.type]) == 'undefined') { + return; + } + if (allchildren.indexOf(p.type) < 0) { + allchildren.push(p.type); } - if (typeof(methods[cls][full_method_name]) == 'undefined') { - methods[cls][full_method_name] = []; + if (typeof(methods[cls]) == 'undefined') { + methods[cls] = {} } - if (methods[cls][full_method_name].indexOf(m.name) > -1) { + + if (typeof(methods[cls][p.type]) == 'undefined') { + methods[cls][p.type] = []; + } + var fullname = m.memberOf + '.' + m.name; + if (allmethods.indexOf(fullname) < 0) { + allmethods.push(fullname); + } + + if (methods[cls][p.type].indexOf(fullname) > -1) { return; } - methods[cls][full_method_name].push(m.name); + methods[cls][p.type].push(fullname); + + }); @@ -107,14 +122,23 @@ function BuildLists () { } this.methods = methods; - this.allmethods = methods; + this.allmethods = allmethods; + this.allchildren = allchildren; + this.implementations = implementations; + //print(JSON.stringify(methods,null,4)); //print(JSON.stringify(implementations,null,4)); } + + + + + + // we now have a list of classes / methods that can be used.. // we now need a ui to flag stuff as "don't bother with"