JSDOC/SymbolSet.js
[gnome.introspection-doc-generator] / JSDOC / SymbolSet.js
index 156fe4a..de9245a 100644 (file)
@@ -42,6 +42,7 @@ SymbolSet = XObject.define(
         addSymbol : function(symbol) {
             //print("ADDING SYMBOL:"+symbol.alias.toString());
             
+            
             if (this.hasSymbol(symbol.alias)) {
                 imports.BuildDocs.Options.LOG.warn("Overwriting symbol documentation for: "+symbol.alias + ".");
             }
@@ -64,12 +65,12 @@ SymbolSet = XObject.define(
         /**
          * for serializing
          */
-        toObject : function() {
-            var ret = {}
-            for (var p in this._index) {
-                ret[p] = this._index[p].toObject();
-            }
-            return ret;
+        toJSON : function() {
+            return {
+                '*object' : 'SymbolSet',
+                _index : this._index
+            };
+            
         },
 
 
@@ -98,6 +99,13 @@ SymbolSet = XObject.define(
         resolveBorrows : function() {
             for (p in this._index) {
                 var symbol = this._index[p];
+                
+                if (!symbol.is) {
+                    continue;
+                    print("PROBLEM : " + p);
+                    print(JSON.stringify(symbol, null, 4));
+                   }
+                
                 if (symbol.is("FILE") || symbol.is("GLOBAL")) continue;
                 
                 var borrows = symbol.inherits;
@@ -139,7 +147,11 @@ SymbolSet = XObject.define(
         resolveMemberOf : function() {
             for (var p in this._index) {
                 var symbol = this.getSymbol(p);
-                
+                if (!symbol.is) {
+                    continue;
+                    print("PROBLEM : " + p);
+                    print(JSON.stringify(symbol, null, 4));
+                   }
                 if (symbol.is("FILE") || symbol.is("GLOBAL")) continue;
                 
                 // the memberOf value was provided in the @memberOf tag
@@ -231,8 +243,16 @@ SymbolSet = XObject.define(
 
         resolveAugments : function() {
             // does this sort out multiple extends???
-            for (var p in this._index) {
+            for (var p in this._index) 
+            {
                 var symbol = this.getSymbol(p);
+                if (!symbol.is) {
+                    continue;
+                    print("PROBLEM : " + p);
+                    print(JSON.stringify(symbol, null, 4));
+                }
+                
+                
                 this.buildAugmentsList(symbol); /// build heirachy of inheritance...
                 if (symbol.alias == "_global_" || symbol.is("FILE")) continue;
                 
@@ -245,10 +265,10 @@ SymbolSet = XObject.define(
                     if (contributer) {
                         contributer.childClasses.push(symbol.alias);
                         symbol.inheritsFrom.push(contributer.alias);
-                        if (!isUnique(symbol.inheritsFrom)) {
-                            imports.BuildDocs.Options.LOG.warn("Can't resolve augments: Circular reference: "+symbol.alias+" inherits from "+contributer.alias+" more than once.");
-                        }
-                        else {
+                        //if (!isUnique(symbol.inheritsFrom)) {
+                        //    imports.BuildDocs.Options.LOG.warn("Can't resolve augments: Circular reference: "+symbol.alias+" inherits from "+contributer.alias+" more than once.");
+                        //}
+                        //else {
                             var cmethods = contributer.methods;
                             var cproperties = contributer.properties;
                             var cfgs = contributer.cfgs;
@@ -263,7 +283,7 @@ SymbolSet = XObject.define(
                             }
                             
                                 
-                        }
+                        //}
                     }
                     else {