private void copyFieldToTargetClass(IField field, CompilationUnit declaringCuNode, TypeDeclaration targetClass, OldASTRewrite rewrite, IProgressMonitor pm, RefactoringStatus status) throws JavaModelException { FieldDeclaration newField= createNewFieldDeclarationNode(field, declaringCuNode, rewrite, pm, status); rewrite.markAsInserted(newField); int insertionIndex= ASTNodes.getInsertionIndex(newField, targetClass.bodyDeclarations()); targetClass.bodyDeclarations().add(insertionIndex, newField);
private void copyFieldToTargetClass(IField field, CompilationUnit declaringCuNode, TypeDeclaration targetClass, TypeVariableMaplet[] mapping, ASTRewrite rewrite, IProgressMonitor pm, RefactoringStatus status) throws JavaModelException { FieldDeclaration newField= createNewFieldDeclarationNode(field, declaringCuNode, mapping, rewrite, pm, status); rewrite.getListRewrite(targetClass, TypeDeclaration.BODY_DECLARATIONS_PROPERTY).insertAt(newField, ASTNodes.getInsertionIndex(newField, targetClass.bodyDeclarations()), null);
	private void copyFieldToTargetClass(IField field, CompilationUnit declaringCuNode, TypeDeclaration targetClass, OldASTRewrite rewrite, IProgressMonitor pm, RefactoringStatus status) throws JavaModelException {		FieldDeclaration newField= createNewFieldDeclarationNode(field, declaringCuNode, rewrite, pm, status);		rewrite.markAsInserted(newField);		int insertionIndex= ASTNodes.getInsertionIndex(newField, targetClass.bodyDeclarations());		targetClass.bodyDeclarations().add(insertionIndex, newField);	}