From dfcc9a572d0d19e836326e2d3bb2d235c44e45a9 Mon Sep 17 00:00:00 2001 From: Sujin Kim Date: Wed, 26 Dec 2012 17:34:06 +0900 Subject: [PATCH] [Title] JSDT : fixed SelectionOnSingleNameReference bug. [Desc.] The SelectionOnSingleNameReference does not create a variableBinding when the reference was lhs and first. it is not same with SingleNameReference. fixed this bug. [Issue] REDMINE-7829 Change-Id: I9430126640be6d3264d35984b502f3d729cd4d03 --- .../codeassist/select/SelectionOnSingleNameReference.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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 2ea52b2..2db439a 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 @@ -44,7 +44,10 @@ public class SelectionOnSingleNameReference extends SingleNameReference { public SelectionOnSingleNameReference(char[] source, long pos) { super(source, pos); } -public TypeBinding resolveType(BlockScope scope) { + +public TypeBinding resolveType(BlockScope scope, boolean define, TypeBinding useType) { + super.resolveType(scope, define, useType); + if (this.actualReceiverType != null) { this.binding = scope.getField(this.actualReceiverType, token, this); if (this.binding != null && this.binding.isValidBinding()) { @@ -78,10 +81,6 @@ public TypeBinding resolveType(BlockScope scope) { throw new SelectionNodeFound(binding); } -public TypeBinding resolveType(BlockScope scope, boolean define, TypeBinding useType) { - return resolveType(scope); -} - public TypeBinding resolveForAllocation(BlockScope scope, ASTNode location) { TypeBinding typeBinding=null; this.binding= -- 2.7.4