fEffectiveSelectionStart= node.getStartPosition(); fEffectiveSelectionLength= node.getLength();
setSelectionRanges(simpleName);
	private String simpleNameSelected(SimpleName node) {		ASTNode parent= node.getParent();		ASTNode grandParent= parent.getParent();				if (DEBUG) System.out.println("parent nodeType= " + parent.getClass().getName()); //$NON-NLS-1$		if (DEBUG) System.out.println("GrandParent nodeType= " + grandParent.getClass().getName()); //$NON-NLS-1$				if (parent.getNodeType() == ASTNode.VARIABLE_DECLARATION_STATEMENT){			VariableDeclarationStatement vds= (VariableDeclarationStatement)parent;			if (vds.fragments().size() > 1){				return RefactoringCoreMessages.getString("ChangeTypeRefactoring.multiDeclarationsNotSupported"); //$NON-NLS-1$			}			} else if (parent.getNodeType() == ASTNode.VARIABLE_DECLARATION_FRAGMENT) {			if (grandParent.getNodeType() == ASTNode.VARIABLE_DECLARATION_STATEMENT){				VariableDeclarationStatement vds= (VariableDeclarationStatement)grandParent;				if (vds.fragments().size() > 1){					return RefactoringCoreMessages.getString("ChangeTypeRefactoring.multiDeclarationsNotSupported"); //$NON-NLS-1$				}					fEffectiveSelectionStart= node.getStartPosition();				fEffectiveSelectionLength= node.getLength();			} else if (grandParent.getNodeType() == ASTNode.FIELD_DECLARATION) {				FieldDeclaration fd= (FieldDeclaration)grandParent;				fFieldBinding= ((VariableDeclarationFragment)parent).resolveBinding();				if (fd.fragments().size() > 1){					return RefactoringCoreMessages.getString("ChangeTypeRefactoring.multiDeclarationsNotSupported"); //$NON-NLS-1$				}			}							} else if (parent.getNodeType() == ASTNode.SINGLE_VARIABLE_DECLARATION || parent.getNodeType() == ASTNode.VARIABLE_DECLARATION_FRAGMENT) {			if ((grandParent.getNodeType() == ASTNode.METHOD_DECLARATION)) {				fMethodBinding= ((MethodDeclaration)grandParent).resolveBinding();				fParamIndex= ((MethodDeclaration)grandParent).parameters().indexOf(parent);			}		} else if (parent.getNodeType() == ASTNode.SIMPLE_TYPE && (grandParent.getNodeType() == ASTNode.SINGLE_VARIABLE_DECLARATION)) {			ASTNode greatGrandParent= grandParent.getParent();			if (greatGrandParent != null && greatGrandParent.getNodeType() == ASTNode.METHOD_DECLARATION) {				fMethodBinding= ((MethodDeclaration)greatGrandParent).resolveBinding();				fParamIndex= ((MethodDeclaration)greatGrandParent).parameters().indexOf(grandParent);			}			fEffectiveSelectionStart= node.getStartPosition();			fEffectiveSelectionLength= node.getLength();		} else if (parent.getNodeType() == ASTNode.SIMPLE_TYPE && grandParent.getNodeType() == ASTNode.METHOD_DECLARATION) {			fMethodBinding= ((MethodDeclaration)grandParent).resolveBinding();			fParamIndex= -1;		} else if (parent.getNodeType() == ASTNode.METHOD_DECLARATION && 				   grandParent.getNodeType() == ASTNode.TYPE_DECLARATION) {			MethodDeclaration methodDeclaration= (MethodDeclaration)parent;			if (methodDeclaration.getName().equals(node)){				return RefactoringCoreMessages.getString("ChangeTypeRefactoring.notSupportedOnNodeType"); //$NON-NLS-1$			}			fMethodBinding= ((MethodDeclaration)parent).resolveBinding();			fParamIndex= -1;		} else if (			parent.getNodeType() == ASTNode.SIMPLE_TYPE && (grandParent.getNodeType() == ASTNode.VARIABLE_DECLARATION_STATEMENT)) {			return variableDeclarationStatementSelected((VariableDeclarationStatement) grandParent);		} else if (parent.getNodeType() == ASTNode.CAST_EXPRESSION) {			ASTNode decl= findDeclaration(parent.getRoot(), fSelectionStart, fSelectionLength+1);			VariableDeclarationFragment fragment= (VariableDeclarationFragment)decl;			fEffectiveSelectionStart= fragment.getName().getStartPosition(); 			fEffectiveSelectionLength= fragment.getName().getLength();		} else if (parent.getNodeType() == ASTNode.SIMPLE_TYPE && 			       grandParent.getNodeType() == ASTNode.FIELD_DECLARATION) {			return fieldDeclarationSelected((FieldDeclaration) grandParent);		} else if (parent.getNodeType() == ASTNode.SIMPLE_TYPE && 			       grandParent.getNodeType() == ASTNode.ARRAY_TYPE){			return RefactoringCoreMessages.getString("ChangeTypeRefactoring.arraysNotSupported"); //$NON-NLS-1$		} else {			return RefactoringCoreMessages.getString("ChangeTypeRefactoring.notSupportedOnNodeType"); //$NON-NLS-1$		}		return null;	}