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
fEditor= editor;
		setEnabled(checkEditor());
		WorkbenchHelp.setHelp(this, IJavaHelpContextIds.SURROUND_WITH_TRY_CATCH_ACTION);
	}
	protected void run(ITextSelection selection) {
		ICompilationUnit cu= getCompilationUnit();
		if (cu == null || !ElementValidator.checkValidateEdit(cu, getShell(), getDialogTitle()))
			return;
		SurroundWithTryCatchRefactoring refactoring= new SurroundWithTryCatchRefactoring(getCompilationUnit(), selection, 
			JavaPreferencesSettings.getCodeGenerationSettings(),
			new Query(getShell()));
		IRewriteTarget target= null;
		try {
			target= (IRewriteTarget)fEditor.getAdapter(IRewriteTarget.class);
			if (target != null)
				target.beginCompoundChange();
			RefactoringStatus status= refactoring.checkActivation(new NullProgressMonitor());
			if (status.hasFatalError()) {
				RefactoringErrorDialogUtil.open(getDialogTitle(), status);
				RefactoringStatusEntry entry= status.getFirstEntry(RefactoringStatus.FATAL);
				if (entry.getContext() instanceof JavaSourceContext && fEditor != null) {
					JavaSourceContext context= (JavaSourceContext)entry.getContext();
					ISourceRange range= context.getSourceRange();
					fEditor.setHighlightRange(range.getOffset(), range.getLength(), true);
				}
				return;
			}
			if (refactoring.stopExecution())
				return;
			PerformChangeOperation op= new PerformChangeOperation(refactoring.createChange(new NullProgressMonitor()));