Builder3/Window.js
[app.Builder.js] / tools / build_gtk_tree.js
index 23b6c05..1250e7f 100644 (file)
@@ -1,5 +1,16 @@
 //<script type="text/javascript">
 
+
+/**
+ * usage:
+ * 
+ * this.data = new BuildLists();
+ * 
+ * 
+ * 
+ * 
+ * 
+ */
 // see if we can build the insertion tree for gtk - using introspection
 
 // it should build the tree of feasible insertions, then we will have to manually prune it..
@@ -56,8 +67,9 @@ function BuildLists () {
     print("Looping throught namespaces");
     var ns_idx = [];
     var implementations = {};
-    var methods = {}
-       
+    var methods = {};
+    var allmethods = [];  
+    
     for (cls in classes) {
         var odata = classes[cls];
         methods[cls] = {}
@@ -71,13 +83,20 @@ function BuildLists () {
                 if (!p.type || typeof(classes[p.type]) == 'undefined') {
                     return;
                 }
-                if (typeof(methods[cls][p.type]) == 'undefined') {
-                    methods[cls][p.type] = [];
+                // now add it..
+                
+                var full_method_name = p.memberOf + '.' + p.type;
+                if (allmethods.indexOf(full_method_name) < 0) {
+                    allmethods.push(full_method_name);
+                }
+                
+                if (typeof(methods[cls][full_method_name]) == 'undefined') {
+                    methods[cls][full_method_name] = [];
                 }
-                if (methods[cls][p.type].indexOf(m.name) > -1) {
+                if (methods[cls][full_method_name].indexOf(m.name) > -1) {
                     return;
                 }
-                methods[cls][p.type].push(m.name);
+                methods[cls][full_method_name].push(m.name);
                 
             });
             
@@ -89,6 +108,7 @@ function BuildLists () {
         
     }
     this.methods = methods;
+    this.allmethods = methods;
     this.implementations = implementations;
     //print(JSON.stringify(methods,null,4));
     //print(JSON.stringify(implementations,null,4));