Bug 77649 'Refactor -> Undo' enabled after consecutive change
I200411022000 Having: package test2; public class A { public C c= new C(); public void foo() { } } package test2; public class B { public void bar() { new A().foo(); } } package test2; public class C { } and: - open all 3 CUs - move A#foo() to C - remove 'a' from 'new A().c.foo(a);' in B - save B - Refactor -> Undo -> lost parenthesis in B because undo did no longer match
org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/internal/core/refactoring/UndoManager.java
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.ISafeRunnable;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.SubProgressMonitor;
import org.eclipse.core.resources.IWorkspaceRunnable;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.ltk.core.refactoring.Change;
import org.eclipse.ltk.core.refactoring.IUndoManager;
import org.eclipse.ltk.core.refactoring.IUndoManagerListener;
import org.eclipse.ltk.core.refactoring.IValidationCheckResultQuery;
import org.eclipse.ltk.core.refactoring.RefactoringStatus;
/**
 * Default implementation of IUndoManager.
 */
public class UndoManager implements IUndoManager {
	private Stack fUndoChanges;
	private Stack fRedoChanges;
	private Stack fUndoNames;
	private Stack fRedoNames;
	private ListenerList fListeners;
	
	private static final int MAX_UNDO_REDOS= 6;
	
	private static class NullQuery implements IValidationCheckResultQuery {
		public boolean proceed(RefactoringStatus status) {
			return true;
		}
		public void stopped(RefactoringStatus status) {