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
query= new NullQuery();	
		Change undo;
		try {
			undo= executeChange(result, change, query, pm);
		} catch (InterruptedException e) {
			fRedoChanges.push(change);
			return;
		}
		if (!result.hasFatalError()) {
			if (undo != null && !fRedoNames.isEmpty()) {
				fUndoNames.push(fRedoNames.pop());
				fUndoChanges.push(undo);
				fireRedoStackChanged();
				fireUndoStackChanged();
			}
		} else {
			flush();
		}
	}
	private Change executeChange(final RefactoringStatus status, final Change change, final IValidationCheckResultQuery query, IProgressMonitor pm) throws CoreException, InterruptedException {
		final Change[] undo= new Change[1];
		final boolean[] interrupted= new boolean[1];
		IWorkspaceRunnable runnable= new IWorkspaceRunnable() {
			public void run(IProgressMonitor monitor) throws CoreException {
				boolean undoInitialized= false;
				try {
					monitor.beginTask("", 11); 
					status.merge(change.isValid(new SubProgressMonitor(monitor, 2)));
					if (status.hasFatalError()) {
						query.stopped(status);