Bug 73656 Encoding: refactoring should flush the undo stack on encoding changes
Refactoring should flush the undo stack on encoding changes. It is questionable what to do if the encoding changes since the encoding has an impact on the number of characters. Alternativly the UndoTectFileChange could remember the encoding and could compare it in isValid(...).
org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/internal/core/refactoring/BufferValidationState.java
}
		public void dirtyStateChanged(IFileBuffer buffer, boolean isDirty) {
		}
		public void stateValidationChanged(IFileBuffer buffer, boolean isStateValidated) {
		}
		public void underlyingFileMoved(IFileBuffer buffer, IPath path) {
		}
		public void underlyingFileDeleted(IFileBuffer buffer) {
		}
		public void stateChangeFailed(IFileBuffer buffer) {
		}
	}
	
	public DirtyBufferValidationState(IFile file) {
		super(file);
		fContentStamp= file.getModificationStamp();
		fFileBufferListener= new FileBufferListener();
		FileBuffers.getTextFileBufferManager().addFileBufferListener(fFileBufferListener);
		fDocumentListener= new DocumentChangedListener();
		getDocument().addDocumentListener(fDocumentListener);
	}
	public RefactoringStatus isValid(boolean needsSaving) {
		RefactoringStatus result= super.isValid(needsSaving);
		if (result.hasFatalError())
			return result;
		 
		 
		
		 
		if (fChanged || fContentStamp != fFile.getModificationStamp()) {