Bug 86135 Make use of new IResource#revertModificationStamp(long) API
org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/core/refactoring/UndoTextFileChange.java
try {
			manager.connect(fFile.getFullPath(), new SubProgressMonitor(pm, 1));
			buffer= manager.getTextFileBuffer(fFile.getFullPath());
			IDocument document= buffer.getDocument();
			UndoEdit redo= fUndo.apply(document, TextEdit.CREATE_UNDO);
			ContentStamp currentStamp= ContentStamps.get(fFile, true);
			if (needsSaving())
				buffer.commit(pm, false);
			ContentStamps.set(fFile, fContentStampToRestore);
			return createUndoChange(redo, currentStamp);
		} catch (BadLocationException e) {
			throw Changes.asCoreException(e);
		} finally {
			if (buffer != null)
				manager.disconnect(fFile.getFullPath(), new SubProgressMonitor(pm, 1));
		}
	}
	
	/**
	 * {@inheritDoc}
	 */
	public void dispose() {
		fValidationState.dispose();
	}
	
	private boolean needsSaving() {
		return (fSaveMode & TextFileChange.FORCE_SAVE) != 0 || (!fDirty && (fSaveMode & TextFileChange.KEEP_SAVE_STATE) != 0);
	}
}