Bug 24255 Internal error when invoking "Restore from Local History" in Outline view
smoke for 20021001 1. Open TestCase.java 2. Select the method at the end of the Outline view 3. From context menu select "Delete" 4. Now you must be fast: in the dialog press "Yes", go to the previously selected method, open the context menu and select "Restore from Local History..."
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaReplaceWithEditionAction.java
ExceptionHandler.handle(ex, shell, errorTitle, errorMessage);
		} catch(InterruptedException ex) {
			
			
		} catch(CoreException ex) {
			ExceptionHandler.handle(ex, shell, errorTitle, errorMessage);
		} finally {
			if (buffer != null)
				TextBuffer.release(buffer);
		}
	}
	
	private JavaEditor getEditor(IFile file) {
		IWorkbench workbench= JavaPlugin.getDefault().getWorkbench();
		IWorkbenchWindow[] windows= workbench.getWorkbenchWindows();
		for (int i= 0; i < windows.length; i++) {
			IWorkbenchPage[] pages= windows[i].getPages();
			for (int x= 0; x < pages.length; x++) {
				IEditorPart[] editors= pages[x].getDirtyEditors();
				for (int z= 0; z < editors.length; z++) {
					IEditorPart ep= editors[z];
					if (ep instanceof JavaEditor)
						return (JavaEditor) ep;
				}
			}
		}
		return null;
	}
}