final CompilationUnitChange change= rewrite.createChange(); change.setKeepPreviewEdits(true); manager.manage(getDeclaringCU(), change);
Change delegateChange= creator.createChange(); if (delegateChange != null) fDelegateChanges.add(delegateChange); CompilationUnitChange cuChange= rewrite.createChange(); if (cuChange != null) { cuChange.setKeepPreviewEdits(true); manager.manage(getDeclaringCU(), cuChange); }
	final void addDeclarationUpdate(TextChangeManager manager) throws CoreException {		if (getDelegateUpdating()) {			// create the delegate			CompilationUnitRewrite rewrite= new CompilationUnitRewrite(getDeclaringCU());			rewrite.setResolveBindings(true);			MethodDeclaration methodDeclaration= ASTNodeSearchUtil.getMethodDeclarationNode(getMethod(), rewrite.getRoot());			DelegateMethodCreator creator= new DelegateMethodCreator();			creator.setDeclaration(methodDeclaration);			creator.setDeclareDeprecated(getDeprecateDelegates());			creator.setSourceRewrite(rewrite);			creator.setCopy(true);			creator.setNewElementName(getNewElementName());			creator.prepareDelegate();			creator.createEdit();			final CompilationUnitChange change= rewrite.createChange();			change.setKeepPreviewEdits(true);			manager.manage(getDeclaringCU(), change);		}		String editName= RefactoringCoreMessages.RenameMethodRefactoring_update_declaration;		ISourceRange nameRange= getMethod().getNameRange();		ReplaceEdit replaceEdit= new ReplaceEdit(nameRange.getOffset(), nameRange.getLength(), getNewElementName());		addTextEdit(manager.get(getDeclaringCU()), editName, replaceEdit);	}