|
From: <caw...@us...> - 2007-07-20 16:17:15
|
Revision: 2810
http://svn.sourceforge.net/rubyeclipse/?rev=2810&view=rev
Author: cawilliams
Date: 2007-07-20 09:17:13 -0700 (Fri, 20 Jul 2007)
Log Message:
-----------
fix the type hierarchy view a bit
Modified Paths:
--------------
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/hierarchy/HierarchyResolver.java
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/hierarchy/HierarchyResolver.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/hierarchy/HierarchyResolver.java 2007-07-20 16:17:09 UTC (rev 2809)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/hierarchy/HierarchyResolver.java 2007-07-20 16:17:13 UTC (rev 2810)
@@ -53,7 +53,7 @@
IType[] types = cu.getAllTypes();
for (int j = 0; j < types.length; j++) {
try {
- reportHierarchy(types[i]);
+ reportHierarchy(types[j]);
} catch (RubyModelException e) {
// ignore
}
@@ -69,7 +69,7 @@
private void reportHierarchy(IType type) throws RubyModelException {
IType superclass;
- if (type.isModule()){ // do not connect interfaces to Object
+ if (type.isModule()){ // do not connect modules to Object
superclass = null;
} else {
superclass = findSuperClass(type);
@@ -77,6 +77,9 @@
IType[] superinterfaces = findSuperInterfaces(type);
this.builder.connect(type, superclass, superinterfaces);
+ if (type.isClass() && superclass != null) {
+ reportHierarchy(superclass);
+ } // FIXME What about Modules!? How do we recurse through those?
}
private IType[] findSuperInterfaces(IType type) throws RubyModelException {
@@ -90,6 +93,7 @@
private IType findSuperClass(IType type) throws RubyModelException {
String name = type.getSuperclassName();
+ if (name == null) return null;
return getLogicalType(type, name);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|