Bug 28244 Edit->Undo / Refactor->Undo don't play well together
reproducible in I20021210 with the following steps and code: - select "b + c" - extract local - edit->undo - refactor->undo public class Test { public Test() { int a= 1; int b= 2; int c= 3; int d= a + b + c; } }
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/SurroundWithTryCatchAction.java
op.setChangeContext(new ChangeContext(new AbortChangeExceptionHandler()));
			new BusyIndicatorRunnableContext().run(false, false, op);
		} catch (CoreException e) {
			ExceptionHandler.handle(e, getDialogTitle(), RefactoringMessages.getString("SurroundWithTryCatchAction.exception")); 
		} catch (InvocationTargetException e) {
			ExceptionHandler.handle(e, getDialogTitle(), RefactoringMessages.getString("SurroundWithTryCatchAction.exception")); 
		} catch (InterruptedException e) {
			
		} finally {
			if (target != null)
				target.endCompoundChange();
		}
	}
	protected void selectionChanged(ITextSelection selection) {
		setEnabled(selection.getLength() > 0 && checkEditor());
	}
	
	private final ICompilationUnit getCompilationUnit() {
		return SelectionConverter.getInputAsCompilationUnit(fEditor);
	}
	
	private boolean checkEditor() {
		return fEditor != null && getCompilationUnit() != null;
	}
	
	private static String getDialogTitle() {
		return RefactoringMessages.getString("SurroundWithTryCatchAction.dialog.title"); 
	}
}