tools/build_gtk_tree.js
[app.Builder.js] / tools / build_gtk_tree.js
index dfe698b..5e1796f 100644 (file)
@@ -51,17 +51,34 @@ ns_list.forEach(function(ns_name) {
 print("Looping throught namespaces");
 var ns_idx = [];
 var implementations = {};
-
+var methods = {}
+   
 for (cls in classes) {
     var odata = classes[cls];
+    methods[cls] = {}
+       
     implementations[odata.alias] = odata.titleType == 'Class' ? odata.childClasses :  odata.implementedBy;  
-    print(JSON.stringify(odata.methods,null,4));
-    
+    //print(JSON.stringify(odata.methods,null,4));
+    odata.methods.forEach(function(m) {
+       
+        m.params.forEach(function(p) {
+             
+            if (!p.type || typeof(classes[p.type]) == 'undefined') {
+                return;
+            }
+            if (typeof(methods[cls][p.type]) == 'undefined') {
+                methods[cls][p.type] = [];
+            }
+            methods[cls][p.type].push(m.name);
+            
+        });
+        
+    });
     //for(method in odata.methods) {
     //    print(method.name);
     //}
     
     
 }
+ print(JSON.stringify(methods,null,4));
 print(JSON.stringify(implementations,null,4));
\ No newline at end of file