newDecl.setType(ASTResolving.getTypeFromTypeBinding(ast, fTypeBinding));
String typeName= addImport(fTypeBinding); newDecl.setType(ASTNodeFactory.newType(ast, typeName));
	private ASTRewrite doAddField() throws CoreException {		ASTNode newTypeDecl= ASTResolving.findParentType(fExpressionStatement);		Expression expression= fExpressionStatement.getExpression();				boolean isAnonymous= newTypeDecl.getNodeType() == ASTNode.ANONYMOUS_CLASS_DECLARATION;		List decls= isAnonymous ?  ((AnonymousClassDeclaration) newTypeDecl).bodyDeclarations() :  ((TypeDeclaration) newTypeDecl).bodyDeclarations();				ASTRewrite rewrite= new ASTRewrite(newTypeDecl);		AST ast= fExpressionStatement.getAST();					String varName= suggestFieldNames(fTypeBinding);		VariableDeclarationFragment newDeclFrag= ast.newVariableDeclarationFragment();		newDeclFrag.setName(ast.newSimpleName(varName));				FieldDeclaration newDecl= ast.newFieldDeclaration(newDeclFrag);		newDecl.setType(ASTResolving.getTypeFromTypeBinding(ast, fTypeBinding));		newDecl.setModifiers(Modifier.PRIVATE);				Assignment assignment= ast.newAssignment();		assignment.setLeftHandSide(ast.newSimpleName(varName));		assignment.setRightHandSide((Expression) rewrite.createCopy(expression));		rewrite.markAsReplaced(expression, assignment, "ID"); //$NON-NLS-1$				decls.add(findInsertIndex(decls, fExpressionStatement.getStartPosition()), newDecl);				addImport(fTypeBinding);		rewrite.markAsInserted(newDecl);		return rewrite;			}