|
From: <caw...@us...> - 2007-07-25 19:17:51
|
Revision: 2883
http://rubyeclipse.svn.sourceforge.net/rubyeclipse/?rev=2883&view=rev
Author: cawilliams
Date: 2007-07-25 12:17:49 -0700 (Wed, 25 Jul 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/codeassist/CompletionEngine.java
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/codeassist/RubyElementRequestor.java
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/codeassist/SelectionEngine.java
Added Paths:
-----------
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core/search/CollectingSearchRequestor.java
Removed Paths:
-------------
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/search/CollectingSearchRequestor.java
Copied: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core/search/CollectingSearchRequestor.java (from rev 2724, trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/search/CollectingSearchRequestor.java)
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core/search/CollectingSearchRequestor.java (rev 0)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core/search/CollectingSearchRequestor.java 2007-07-25 19:17:49 UTC (rev 2883)
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.rubypeople.rdt.core.search;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.CoreException;
+
+/**
+ * Collects the results returned by a <code>SearchEngine</code>.
+ */
+public class CollectingSearchRequestor extends SearchRequestor {
+ private ArrayList<SearchMatch> fFound;
+
+ public CollectingSearchRequestor() {
+ fFound = new ArrayList<SearchMatch>();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jdt.core.search.SearchRequestor#acceptSearchMatch(org.eclipse.jdt.core.search.SearchMatch)
+ */
+ public void acceptSearchMatch(SearchMatch match) throws CoreException {
+ fFound.add(match);
+ }
+
+ /**
+ * @return a List of {@link SearchMatch}es (not sorted)
+ */
+ public List<SearchMatch> getResults() {
+ return fFound;
+ }
+}
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-07-25 18:47:27 UTC (rev 2882)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/codeassist/CompletionEngine.java 2007-07-25 19:17:49 UTC (rev 2883)
@@ -46,6 +46,7 @@
import org.rubypeople.rdt.core.IType;
import org.rubypeople.rdt.core.RubyCore;
import org.rubypeople.rdt.core.RubyModelException;
+import org.rubypeople.rdt.core.search.CollectingSearchRequestor;
import org.rubypeople.rdt.core.search.IRubySearchConstants;
import org.rubypeople.rdt.core.search.IRubySearchScope;
import org.rubypeople.rdt.core.search.SearchMatch;
@@ -55,7 +56,6 @@
import org.rubypeople.rdt.internal.core.RubyType;
import org.rubypeople.rdt.internal.core.parser.RubyParser;
import org.rubypeople.rdt.internal.core.search.BasicSearchEngine;
-import org.rubypeople.rdt.internal.core.search.CollectingSearchRequestor;
import org.rubypeople.rdt.internal.core.util.ASTUtil;
import org.rubypeople.rdt.internal.core.util.Util;
import org.rubypeople.rdt.internal.ti.BasicTypeGuess;
@@ -277,7 +277,9 @@
types = filtered.toArray(new IType[filtered.size()]);
includeInstance = false;
} else if (element instanceof IType) {
- types = new IType[] {(IType) element};
+ IType type = (IType) element;
+ RubyElementRequestor requestor = new RubyElementRequestor(script);
+ types = requestor.findType(type.getFullyQualifiedName());
} else {
types = new IType[] {element.getDeclaringType()};
}
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/codeassist/RubyElementRequestor.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/codeassist/RubyElementRequestor.java 2007-07-25 18:47:27 UTC (rev 2882)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/codeassist/RubyElementRequestor.java 2007-07-25 19:17:49 UTC (rev 2883)
@@ -8,13 +8,13 @@
import org.rubypeople.rdt.core.IRubyScript;
import org.rubypeople.rdt.core.IType;
import org.rubypeople.rdt.core.RubyCore;
+import org.rubypeople.rdt.core.search.CollectingSearchRequestor;
import org.rubypeople.rdt.core.search.IRubySearchConstants;
import org.rubypeople.rdt.core.search.IRubySearchScope;
import org.rubypeople.rdt.core.search.SearchMatch;
import org.rubypeople.rdt.core.search.SearchParticipant;
import org.rubypeople.rdt.core.search.SearchPattern;
import org.rubypeople.rdt.internal.core.search.BasicSearchEngine;
-import org.rubypeople.rdt.internal.core.search.CollectingSearchRequestor;
public class RubyElementRequestor {
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/codeassist/SelectionEngine.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/codeassist/SelectionEngine.java 2007-07-25 18:47:27 UTC (rev 2882)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/codeassist/SelectionEngine.java 2007-07-25 19:17:49 UTC (rev 2883)
@@ -39,6 +39,7 @@
import org.rubypeople.rdt.core.IType;
import org.rubypeople.rdt.core.RubyCore;
import org.rubypeople.rdt.core.RubyModelException;
+import org.rubypeople.rdt.core.search.CollectingSearchRequestor;
import org.rubypeople.rdt.core.search.IRubySearchConstants;
import org.rubypeople.rdt.core.search.IRubySearchScope;
import org.rubypeople.rdt.core.search.SearchEngine;
@@ -48,7 +49,6 @@
import org.rubypeople.rdt.internal.core.RubyScript;
import org.rubypeople.rdt.internal.core.parser.RubyParser;
import org.rubypeople.rdt.internal.core.search.BasicSearchEngine;
-import org.rubypeople.rdt.internal.core.search.CollectingSearchRequestor;
import org.rubypeople.rdt.internal.core.util.ASTUtil;
import org.rubypeople.rdt.internal.core.util.Util;
import org.rubypeople.rdt.internal.ti.DefaultTypeInferrer;
Deleted: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/search/CollectingSearchRequestor.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/search/CollectingSearchRequestor.java 2007-07-25 18:47:27 UTC (rev 2882)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/search/CollectingSearchRequestor.java 2007-07-25 19:17:49 UTC (rev 2883)
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.rubypeople.rdt.internal.core.search;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.CoreException;
-import org.rubypeople.rdt.core.search.SearchMatch;
-import org.rubypeople.rdt.core.search.SearchRequestor;
-
-/**
- * Collects the results returned by a <code>SearchEngine</code>.
- */
-public class CollectingSearchRequestor extends SearchRequestor {
- private ArrayList<SearchMatch> fFound;
-
- public CollectingSearchRequestor() {
- fFound = new ArrayList<SearchMatch>();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jdt.core.search.SearchRequestor#acceptSearchMatch(org.eclipse.jdt.core.search.SearchMatch)
- */
- public void acceptSearchMatch(SearchMatch match) throws CoreException {
- fFound.add(match);
- }
-
- /**
- * @return a List of {@link SearchMatch}es (not sorted)
- */
- public List<SearchMatch> getResults() {
- return fFound;
- }
-}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|