ASTNode elem= (ASTNode) vds.fragments().iterator().next(); if (elem.getNodeType() == ASTNode.VARIABLE_DECLARATION_FRAGMENT) { simpleNameSelected(((VariableDeclarationFragment) elem).getName()); fEffectiveSelectionStart= ((VariableDeclarationFragment) elem).getName().getStartPosition(); fEffectiveSelectionLength= ((VariableDeclarationFragment) elem).getName().getLength(); } else{ return nodeTypeNotSupported(); }
VariableDeclarationFragment elem= (VariableDeclarationFragment) vds.fragments().iterator().next(); SimpleName name= elem.getName(); setSelectionRanges(name); return simpleNameSelected(name);
	private String variableDeclarationStatementSelected(VariableDeclarationStatement vds) {		if (vds.fragments().size() != 1) {			return RefactoringCoreMessages.getString("ChangeTypeRefactoring.multiDeclarationsNotSupported"); //$NON-NLS-1$		} else {			ASTNode elem= (ASTNode) vds.fragments().iterator().next();			if (elem.getNodeType() == ASTNode.VARIABLE_DECLARATION_FRAGMENT) {				simpleNameSelected(((VariableDeclarationFragment) elem).getName());				fEffectiveSelectionStart= ((VariableDeclarationFragment) elem).getName().getStartPosition(); 				fEffectiveSelectionLength= ((VariableDeclarationFragment) elem).getName().getLength();			} else{				return nodeTypeNotSupported();			}		}		return null;	}