|
From: <caw...@us...> - 2007-03-02 19:14:45
|
Revision: 2074
http://svn.sourceforge.net/rubyeclipse/?rev=2074&view=rev
Author: cawilliams
Date: 2007-03-02 11:14:44 -0800 (Fri, 02 Mar 2007)
Log Message:
-----------
fix completion on class's super type in declaration (at least when the source isn't broken...)
Modified Paths:
--------------
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/codeassist/CompletionEngine.java
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/codeassist/CompletionEngine.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/codeassist/CompletionEngine.java 2007-03-02 14:58:34 UTC (rev 2073)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/codeassist/CompletionEngine.java 2007-03-02 19:14:44 UTC (rev 2074)
@@ -90,6 +90,7 @@
}
}
} else {
+ // FIXME If we're invoked on the class declaration (it's super class) don't do this!
// FIXME Traverse the IRubyElement model, not nodes (and don't reparse)?
getDocumentsRubyElementsInScope();
}
@@ -433,11 +434,10 @@
/** Lookup type declaration nodes */
private List<Node> getTypeDeclarationNodes(String typeName) {
- System.out.println("Being asked for the type decl node for " + typeName);
-
// Find the named type
RubyElementRequestor requestor = new RubyElementRequestor(fContext.getScript());
IType[] types = requestor.findType(typeName);
+ if (types == null || types.length == 0) return new ArrayList<Node>(0);
IType type = types[0];
try {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|