From e6005bb514792f18353824a95a5f59f11f471ebc Mon Sep 17 00:00:00 2001 From: Jaeheung Kim Date: Fri, 22 Mar 2013 11:59:31 +0900 Subject: [PATCH] [Title] JSDT : SelectionOnSingleNameReference bug is fixed. [Desc.] SelectionOnSingleNameReference.resolveForAllocation function is fixed to resolve correctly. [Issue] REDMINE-7934 --- .../internal/codeassist/select/SelectionOnSingleNameReference.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/codeassist/select/SelectionOnSingleNameReference.java b/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/codeassist/select/SelectionOnSingleNameReference.java index 2db439a..95b06b1 100644 --- a/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/codeassist/select/SelectionOnSingleNameReference.java +++ b/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/codeassist/select/SelectionOnSingleNameReference.java @@ -84,7 +84,9 @@ public TypeBinding resolveType(BlockScope scope, boolean define, TypeBinding use public TypeBinding resolveForAllocation(BlockScope scope, ASTNode location) { TypeBinding typeBinding=null; this.binding= - scope.getBinding(this.token, (Binding.TYPE|Binding.METHOD | bits) & RestrictiveFlagMASK, this, true /*resolve*/); + scope.getBinding(this.token, (Binding.TYPE | bits) & RestrictiveFlagMASK, this, true /*resolve*/); + if(binding == null) + this.binding = scope.getBinding(this.token, (Binding.TYPE | Binding.METHOD | bits) & RestrictiveFlagMASK, this, true /*resolve*/); if (binding instanceof TypeBinding) typeBinding=(TypeBinding)binding; else if (binding instanceof MethodBinding) -- 2.7.4