ChildListPropertyDescriptor property=  isAnonymous ? AnonymousClassDeclaration.BODY_DECLARATIONS_PROPERTY : TypeDeclaration.BODY_DECLARATIONS_PROPERTY;
ChildListPropertyDescriptor property= ASTNodes.getBodyDeclarationsProperty(newTypeDecl);
	private ASTRewrite doAddField() throws CoreException {		boolean isParamToField= fNodeToAssign.getNodeType() == ASTNode.SINGLE_VARIABLE_DECLARATION;					ASTNode newTypeDecl= ASTResolving.findParentType(fNodeToAssign);		if (newTypeDecl == null) {			return null;		}				Expression expression= isParamToField ? ((SingleVariableDeclaration) fNodeToAssign).getName() : ((ExpressionStatement) fNodeToAssign).getExpression();				boolean isAnonymous= newTypeDecl.getNodeType() == ASTNode.ANONYMOUS_CLASS_DECLARATION;		ChildListPropertyDescriptor property=  isAnonymous ? AnonymousClassDeclaration.BODY_DECLARATIONS_PROPERTY : TypeDeclaration.BODY_DECLARATIONS_PROPERTY;		List decls= (List) newTypeDecl.getStructuralProperty(property);				AST ast= newTypeDecl.getAST();		ASTRewrite rewrite= ASTRewrite.create(ast);				BodyDeclaration bodyDecl= ASTResolving.findParentBodyDeclaration(fNodeToAssign);		Block body;		if (bodyDecl instanceof MethodDeclaration) {			body= ((MethodDeclaration) bodyDecl).getBody();		} else if (bodyDecl instanceof Initializer) {			body= ((Initializer) bodyDecl).getBody();		} else {			return null;		}				boolean isStatic= Modifier.isStatic(bodyDecl.getModifiers()) && !isAnonymous;		boolean isConstructorParam= isParamToField && fNodeToAssign.getParent() instanceof MethodDeclaration && ((MethodDeclaration) fNodeToAssign.getParent()).isConstructor();		int modifiers= Modifier.PRIVATE;		if (isStatic) {			modifiers |= Modifier.STATIC;		} else if (isConstructorParam) {			modifiers |= Modifier.FINAL;		}				String[] varNames= suggestFieldNames(fTypeBinding, expression, modifiers);		for (int i= 0; i < varNames.length; i++) {			addLinkedPositionProposal(KEY_NAME, varNames[i], null);		}		String varName= varNames[0];				VariableDeclarationFragment newDeclFrag= ast.newVariableDeclarationFragment();		newDeclFrag.setName(ast.newSimpleName(varName));						FieldDeclaration newDecl= ast.newFieldDeclaration(newDeclFrag);				Type type= evaluateType(ast);		newDecl.setType(type);		newDecl.modifiers().addAll(ASTNodeFactory.newModifiers(ast, modifiers));				Assignment assignment= ast.newAssignment();		assignment.setRightHandSide((Expression) rewrite.createCopyTarget(expression));		boolean needsThis= PreferenceConstants.getPreferenceStore().getBoolean(PreferenceConstants.CODEGEN_KEYWORD_THIS);		if (isParamToField) {			needsThis |= varName.equals(((SimpleName) expression).getIdentifier());		}		SimpleName accessName= ast.newSimpleName(varName);		if (needsThis) {			FieldAccess fieldAccess= ast.newFieldAccess();			fieldAccess.setName(accessName);			if (isStatic) {				String typeName= ((TypeDeclaration) newTypeDecl).getName().getIdentifier();				fieldAccess.setExpression(ast.newSimpleName(typeName));			} else {				fieldAccess.setExpression(ast.newThisExpression());			}			assignment.setLeftHandSide(fieldAccess);		} else {			assignment.setLeftHandSide(accessName);		}				int insertIndex= findFieldInsertIndex(decls, fNodeToAssign.getStartPosition());		rewrite.getListRewrite(newTypeDecl, property).insertAt(newDecl, insertIndex, null);		ASTNode selectionNode;		if (isParamToField) {			// assign parameter to field			ExpressionStatement statement= ast.newExpressionStatement(assignment);			int insertIdx=  findAssignmentInsertIndex(body.statements());			rewrite.getListRewrite(body, Block.STATEMENTS_PROPERTY).insertAt(statement, insertIdx, null);			selectionNode= statement;					} else {						rewrite.replace(expression, assignment, null);			selectionNode= fNodeToAssign;		} 				addLinkedPosition(rewrite.track(newDeclFrag.getName()), false, KEY_NAME);		addLinkedPosition(rewrite.track(newDecl.getType()), false, KEY_TYPE);		addLinkedPosition(rewrite.track(accessName), true, KEY_NAME);		setEndPosition(rewrite.track(selectionNode));				return rewrite;			}