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 boolean isDocumentStamp() {
			return fKind == DOCUMENT;
		}
		public int getKind() {
			return fKind;
		}
		public long getValue() {
			return fValue;
		}
	}
	public static BufferValidationState create(IFile file) {
		ITextFileBuffer buffer= getBuffer(file);
		if (buffer == null) {
			return new ModificationStampValidationState(file);
		} else { 
			IDocument document= buffer.getDocument();
			if (document instanceof IDocumentExtension4) {
				return new ModificationStampValidationState(file);
			} else {
				if (buffer.isDirty()) {
					return new DirtyBufferValidationState(file);
				} else {
					return new ModificationStampValidationState(file);
				}
			}
		}
	}
	
	public RefactoringStatus isValid(boolean needsSaving) {