Bug 310665 [Browser] 'Web Browser' preference page ignores cancellation
I20100426-0852 1. Window > Preferences > General > Web Browser 2. In Windows XP, I see "Default system web browser", "Firefox", and "Internet Explorer". 3. Select IE. Click the 'Remove' button. 4. Click 'Cancel'. 5. Redo step 1. 6. Window > Preferences 7. IE is gone. :(
bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserPreferencePage.java
final List foundBrowsers = new ArrayList();
				final List existingPaths = WebBrowserUtil
						.getExternalBrowserPaths();
				
				DirectoryDialog dialog = new DirectoryDialog(getShell());
				dialog.setMessage(Messages.selectDirectory);
				dialog.setText(Messages.directoryDialogTitle);
				String path = dialog.open();
				if (path == null)
					return;
				final File rootDir = new File(path);
				ProgressMonitorDialog pm = new ProgressMonitorDialog(getShell());
				IRunnableWithProgress r = new IRunnableWithProgress() {
					public void run(IProgressMonitor monitor) {
						monitor.beginTask(Messages.searchingTaskName,
								IProgressMonitor.UNKNOWN);
						search(rootDir, existingPaths, foundBrowsers, monitor);
						monitor.done();
					}
				};
				try {
					pm.run(true, true, r);
				} catch (InvocationTargetException ex) {
					Trace.trace(Trace.SEVERE,
							"Invocation Exception occured running monitor: " 
									+ ex);
				} catch (InterruptedException ex) {
					Trace.trace(Trace.SEVERE,
							"Interrupted exception occured running monitor: " 
									+ ex);