X-Git-Url: http://git.roojs.org/?p=gnome.introspection-doc-generator;a=blobdiff_plain;f=Introspect%2FClass.js;h=9a6ee94b6c97de4ab0915b30c63407245c53fd45;hp=04cf8d34708a07c1e2e92a7fe776ea6b143e295d;hb=HEAD;hpb=ba3a7c9fac5e2c7981df52e6a748406527d506d0 diff --git a/Introspect/Class.js b/Introspect/Class.js index 04cf8d3..9a6ee94 100644 --- a/Introspect/Class.js +++ b/Introspect/Class.js @@ -25,6 +25,7 @@ Base = imports.Base.Base; Class = XObject.define( function(ns, name) { Base.call(this, ns, name); + //print("Class ctr - parent called"); this.loadExtends(); this.loadImplements(); //console.log("CREATED(Class) " + this.alias); @@ -39,9 +40,9 @@ Class = XObject.define( var pi = GI.object_info_get_parent(bi); this.extendsClasses = []; - if (!pi) { + if (!pi || (pi.get_namespace() == this.ns && pi.get_name() == this.name )) { return; - } + } this.parent = NameSpace.factory( 'Class', pi.get_namespace(), @@ -55,9 +56,21 @@ Class = XObject.define( this.extendsClasses.push(p); },this); + if (this.parent) { + this.parent.addChildClass(this.alias); + } }, + + addChildClass : function (n) { + this.childClasses.push(n); + if (this.parent) { + this.parent.addChildClass(n); + } + }, + + loadImplements : function() { var bb = this.getBI();