|
From: <caw...@us...> - 2007-06-12 19:00:49
|
Revision: 2610
http://svn.sourceforge.net/rubyeclipse/?rev=2610&view=rev
Author: cawilliams
Date: 2007-06-12 12:00:47 -0700 (Tue, 12 Jun 2007)
Log Message:
-----------
when traversing AST nodes for elements in local script (for completiosn with empty prefix) include constants as well as instance and class variables
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-06-12 18:56:45 UTC (rev 2609)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/codeassist/CompletionEngine.java 2007-06-12 19:00:47 UTC (rev 2610)
@@ -20,6 +20,7 @@
import org.jruby.ast.ClassVarDeclNode;
import org.jruby.ast.ClassVarNode;
import org.jruby.ast.Colon2Node;
+import org.jruby.ast.ConstDeclNode;
import org.jruby.ast.ConstNode;
import org.jruby.ast.DefnNode;
import org.jruby.ast.DefsNode;
@@ -602,7 +603,7 @@
// Get instance and class variables available in the enclosing type
List<Node> instanceAndClassVars = ScopedNodeLocator.Instance().findNodesInScope(typeNode, new INodeAcceptor() {
public boolean doesAccept(Node node) {
- return (node instanceof InstVarNode || node instanceof InstAsgnNode || node instanceof ClassVarNode || node instanceof ClassVarDeclNode || node instanceof ClassVarAsgnNode);
+ return (node instanceof ConstDeclNode || node instanceof InstVarNode || node instanceof InstAsgnNode || node instanceof ClassVarNode || node instanceof ClassVarDeclNode || node instanceof ClassVarAsgnNode);
}
});
Set<String> fields = new HashSet<String>();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|