|
From: <caw...@us...> - 2007-03-13 18:22:15
|
Revision: 2149
http://svn.sourceforge.net/rubyeclipse/?rev=2149&view=rev
Author: cawilliams
Date: 2007-03-13 11:22:14 -0700 (Tue, 13 Mar 2007)
Log Message:
-----------
Modified Paths:
--------------
branches/search_engine/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/search/matching/MatchLocator.java
branches/search_engine/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/util/HandleFactory.java
Modified: branches/search_engine/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/search/matching/MatchLocator.java
===================================================================
--- branches/search_engine/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/search/matching/MatchLocator.java 2007-03-13 18:18:56 UTC (rev 2148)
+++ branches/search_engine/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/search/matching/MatchLocator.java 2007-03-13 18:22:14 UTC (rev 2149)
@@ -22,6 +22,7 @@
import org.rubypeople.rdt.internal.core.RubyScript;
import org.rubypeople.rdt.internal.core.search.BasicSearchEngine;
import org.rubypeople.rdt.internal.core.search.RubySearchDocument;
+import org.rubypeople.rdt.internal.core.util.HandleFactory;
import org.rubypeople.rdt.internal.core.util.Util;
public class MatchLocator {
@@ -209,7 +210,7 @@
} finally {
if (this.nameEnvironment != null)
this.nameEnvironment.cleanup();
- manager.flushZipFiles();
+// manager.flushZipFiles();
this.bindings = null;
}
}
Modified: branches/search_engine/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/util/HandleFactory.java
===================================================================
--- branches/search_engine/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/util/HandleFactory.java 2007-03-13 18:18:56 UTC (rev 2148)
+++ branches/search_engine/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/util/HandleFactory.java 2007-03-13 18:22:14 UTC (rev 2149)
@@ -30,7 +30,9 @@
import org.rubypeople.rdt.core.RubyCore;
import org.rubypeople.rdt.core.RubyModelException;
import org.rubypeople.rdt.core.search.IRubySearchScope;
+import org.rubypeople.rdt.internal.compiler.env.lookup.MethodScope;
import org.rubypeople.rdt.internal.compiler.env.lookup.Scope;
+import org.rubypeople.rdt.internal.compiler.env.lookup.TypeScope;
import org.rubypeople.rdt.internal.core.Openable;
import org.rubypeople.rdt.internal.core.RubyModel;
import org.rubypeople.rdt.internal.core.RubyModelManager;
@@ -38,9 +40,6 @@
import org.rubypeople.rdt.internal.core.SourceFolderRoot;
import org.rubypeople.rdt.internal.core.SourceRefElement;
-import sun.reflect.generics.scope.ClassScope;
-import sun.reflect.generics.scope.MethodScope;
-
/**
* Creates java element handles.
*/
@@ -117,7 +116,7 @@
/**
* Returns a handle denoting the class member identified by its scope.
*/
- public IRubyElement createElement(ClassScope scope, IRubyScript unit, HashSet existingElements, HashMap knownScopes) {
+ public IRubyElement createElement(TypeScope scope, IRubyScript unit, HashSet existingElements, HashMap knownScopes) {
return createElement(scope, scope.referenceContext.sourceStart, unit, existingElements, knownScopes);
}
/**
@@ -162,35 +161,35 @@
case Scope.METHOD_SCOPE :
IType parentType = (IType) createElement(scope.parent, elementPosition, unit, existingElements, knownScopes);
MethodScope methodScope = (MethodScope) scope;
- if (methodScope.isInsideInitializer()) {
- // inside field or initializer, must find proper one
- TypeDeclaration type = methodScope.referenceType();
- int occurenceCount = 1;
- for (int i = 0, length = type.fields.length; i < length; i++) {
- FieldDeclaration field = type.fields[i];
- if (field.declarationSourceStart < elementPosition && field.declarationSourceEnd > elementPosition) {
- switch (field.getKind()) {
- case AbstractVariableDeclaration.FIELD :
- case AbstractVariableDeclaration.ENUM_CONSTANT :
- newElement = parentType.getField(new String(field.name));
- break;
- case AbstractVariableDeclaration.INITIALIZER :
- newElement = parentType.getInitializer(occurenceCount);
- break;
- }
- break;
- } else if (field.getKind() == AbstractVariableDeclaration.INITIALIZER) {
- occurenceCount++;
- }
- }
- } else {
+// if (methodScope.isInsideInitializer()) {
+// // inside field or initializer, must find proper one
+// TypeDeclaration type = methodScope.referenceType();
+// int occurenceCount = 1;
+// for (int i = 0, length = type.fields.length; i < length; i++) {
+// FieldDeclaration field = type.fields[i];
+// if (field.declarationSourceStart < elementPosition && field.declarationSourceEnd > elementPosition) {
+// switch (field.getKind()) {
+// case AbstractVariableDeclaration.FIELD :
+//// case AbstractVariableDeclaration.ENUM_CONSTANT :
+// newElement = parentType.getField(new String(field.name));
+// break;
+//// case AbstractVariableDeclaration.INITIALIZER :
+//// newElement = parentType.getInitializer(occurenceCount);
+//// break;
+// }
+// break;
+//// } else if (field.getKind() == AbstractVariableDeclaration.INITIALIZER) {
+//// occurenceCount++;
+// }
+// }
+// } else {
// method element
AbstractMethodDeclaration method = methodScope.referenceMethod();
newElement = parentType.getMethod(new String(method.selector), Util.typeParameterSignatures(method));
if (newElement != null) {
knownScopes.put(scope, newElement);
}
- }
+// }
break;
case Scope.BLOCK_SCOPE :
// standard block, no element per se
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|