[Title] JSDT : fixed SelectionOnSingleNameReference bug.
authorSujin Kim <sujin921.kim@samsung.com>
Wed, 26 Dec 2012 08:34:06 +0000 (17:34 +0900)
committerhyukmin kwon <hyukmin0530.kwon@samsung.com>
Fri, 28 Dec 2012 09:29:08 +0000 (18:29 +0900)
[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

org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/codeassist/select/SelectionOnSingleNameReference.java

index 2ea52b2..2db439a 100644 (file)
@@ -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=