Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

add support to return multiple bindings for findBinding

  • Loading branch information...
commit 94fd95cfa76173f1bff85fea56fe6cd6d0cdf64b 1 parent 40d877c
authored July 25, 2007
6  ...sdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/InMemoryNameEnvironment.java
@@ -46,7 +46,7 @@ public NameEnvironmentAnswer findType(char[][] compoundTypeName, ITypeRequestor
46 46
 		compoundTypeName[compoundTypeName.length - 1],
47 47
 		CharOperation.subarray(compoundTypeName, 0, compoundTypeName.length - 1),requestor);
48 48
 }
49  
-public NameEnvironmentAnswer findBinding(char[] typeName, char[][] packageName, int type, ITypeRequestor requestor) {
  49
+public NameEnvironmentAnswer findBinding(char[] typeName, char[][] packageName, int type, ITypeRequestor requestor, boolean returnMultiple, String excludePath) {
50 50
 	HashtableOfObject cus = (HashtableOfObject)this.compilationUnits.get(CharOperation.concatWith(packageName, '.'));
51 51
 	if (cus == null) {
52 52
 		return this.findTypeFromClassLibs(typeName, packageName,type,requestor);
@@ -59,7 +59,7 @@ public NameEnvironmentAnswer findBinding(char[] typeName, char[][] packageName,
59 59
 }
60 60
 
61 61
 public NameEnvironmentAnswer findType(char[] typeName, char[][] packageName, ITypeRequestor requestor) {
62  
-	return findBinding(typeName, packageName, Binding.TYPE|Binding.PACKAGE,requestor);
  62
+	return findBinding(typeName, packageName, Binding.TYPE|Binding.PACKAGE,requestor, false, null);
63 63
 //	HashtableOfObject cus = (HashtableOfObject)this.compilationUnits.get(CharOperation.concatWith(packageName, '.'));
64 64
 //	if (cus == null) {
65 65
 //		return this.findTypeFromClassLibs(typeName, packageName);
@@ -72,7 +72,7 @@ public NameEnvironmentAnswer findType(char[] typeName, char[][] packageName, ITy
72 72
 }
73 73
 private NameEnvironmentAnswer findTypeFromClassLibs(char[] typeName, char[][] packageName, int type, ITypeRequestor requestor) {
74 74
 	for (int i = 0; i < this.classLibs.length; i++) {
75  
-		NameEnvironmentAnswer answer = this.classLibs[i].findBinding(typeName, packageName, type,requestor);
  75
+		NameEnvironmentAnswer answer = this.classLibs[i].findBinding(typeName, packageName, type,requestor, false, null);
76 76
 		if (answer != null) {
77 77
 			return answer;
78 78
 		}
6  ...core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/InMemoryNameEnvironment.java
@@ -46,7 +46,7 @@ public NameEnvironmentAnswer findType(char[][] compoundTypeName, ITypeRequestor
46 46
 		compoundTypeName[compoundTypeName.length - 1],
47 47
 		CharOperation.subarray(compoundTypeName, 0, compoundTypeName.length - 1),requestor);
48 48
 }
49  
-public NameEnvironmentAnswer findBinding(char[] typeName, char[][] packageName, int type, ITypeRequestor requestor) {
  49
+public NameEnvironmentAnswer findBinding(char[] typeName, char[][] packageName, int type, ITypeRequestor requestor, boolean returnMultiple, String excludePath) {
50 50
 	HashtableOfObject cus = (HashtableOfObject)this.compilationUnits.get(CharOperation.concatWith(packageName, '.'));
51 51
 	if (cus == null) {
52 52
 		return this.findTypeFromClassLibs(typeName, packageName,type,requestor);
@@ -59,7 +59,7 @@ public NameEnvironmentAnswer findBinding(char[] typeName, char[][] packageName,
59 59
 }
60 60
 
61 61
 public NameEnvironmentAnswer findType(char[] typeName, char[][] packageName, ITypeRequestor requestor) {
62  
-	return findBinding(typeName, packageName, Binding.TYPE|Binding.PACKAGE,requestor);
  62
+	return findBinding(typeName, packageName, Binding.TYPE|Binding.PACKAGE,requestor, false, null);
63 63
 //	HashtableOfObject cus = (HashtableOfObject)this.compilationUnits.get(CharOperation.concatWith(packageName, '.'));
64 64
 //	if (cus == null) {
65 65
 //		return this.findTypeFromClassLibs(typeName, packageName);
@@ -72,7 +72,7 @@ public NameEnvironmentAnswer findType(char[] typeName, char[][] packageName, ITy
72 72
 }
73 73
 private NameEnvironmentAnswer findTypeFromClassLibs(char[] typeName, char[][] packageName, int type, ITypeRequestor requestor) {
74 74
 	for (int i = 0; i < this.classLibs.length; i++) {
75  
-		NameEnvironmentAnswer answer = this.classLibs[i].findBinding(typeName, packageName, type,requestor);
  75
+		NameEnvironmentAnswer answer = this.classLibs[i].findBinding(typeName, packageName, type,requestor, false, null);
76 76
 		if (answer != null) {
77 77
 			return answer;
78 78
 		}

0 notes on commit 94fd95c

Please sign in to comment.
Something went wrong with that request. Please try again.