|
From: <caw...@us...> - 2007-08-07 16:07:38
|
Revision: 2933
http://rubyeclipse.svn.sourceforge.net/rubyeclipse/?rev=2933&view=rev
Author: cawilliams
Date: 2007-08-07 09:06:18 -0700 (Tue, 07 Aug 2007)
Log Message:
-----------
search test type hierarchy
Modified Paths:
--------------
trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/internal/testunit/ui/OpenTestAction.java
Modified: trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/internal/testunit/ui/OpenTestAction.java
===================================================================
--- trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/internal/testunit/ui/OpenTestAction.java 2007-08-07 16:05:43 UTC (rev 2932)
+++ trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/internal/testunit/ui/OpenTestAction.java 2007-08-07 16:06:18 UTC (rev 2933)
@@ -18,6 +18,7 @@
import org.rubypeople.rdt.core.IRubyProject;
import org.rubypeople.rdt.core.ISourceRange;
import org.rubypeople.rdt.core.IType;
+import org.rubypeople.rdt.core.ITypeHierarchy;
import org.rubypeople.rdt.core.RubyConventions;
import org.rubypeople.rdt.core.RubyModelException;
import org.rubypeople.rdt.internal.core.util.Messages;
@@ -53,16 +54,16 @@
return type;
IMethod method= findMethod(type);
-// if (method == null) { FIXME When we have type hierarchies implemented, uncomment this!
-// ITypeHierarchy typeHierarchy= type.newSupertypeHierarchy(null);
-// IType[] types= typeHierarchy.getAllSuperclasses(type);
-// for (int i= 0; i < types.length; i++) {
-// method= findMethod(types[i]);
-// if (method != null)
-// break;
-// }
-// }
if (method == null) {
+ ITypeHierarchy typeHierarchy= type.newSupertypeHierarchy(null);
+ IType[] types= typeHierarchy.getAllSuperclasses(type);
+ for (int i= 0; i < types.length; i++) {
+ method= findMethod(types[i]);
+ if (method != null)
+ break;
+ }
+ }
+ if (method == null) {
String title= TestUnitMessages.OpenTestAction_error_title;
String message= Messages.format(TestUnitMessages.OpenTestAction_error_methodNoFound, fMethodName);
MessageDialog.openInformation(getShell(), title, message);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|