Bug 29500 Cannot cancel organize imports
After selecting organize imports on my project (to reduce the 4175 warnings about unused imports I got when I upgraded to 2.1 M4), I decided that maybe this was going to take longer than I thought, so I tried to cancel the action. The cancel button on the dialog didn't to do anything. I can repeat this at will with my project. I'm using Sun's JDK 1.4.1_01 on Debian GNU/Linux, SWT/Motif.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OrganizeImportsAction.java
} catch (CoreException e) {
					JavaPlugin.log(e);
					String message= ActionMessages.getFormattedString("OrganizeImportsAction.multi.error.unexpected", e.getStatus().getMessage()); 
					status.add(new Status(Status.ERROR, JavaUI.ID_PLUGIN, Status.ERROR, message, null));					
				}
			}
		} finally {
			monitor.done();
		}
	}
				
	private void runOnSingle(ICompilationUnit cu, boolean doResolve, boolean inEditor) {
		if (!ElementValidator.check(cu, getShell(), ActionMessages.getString("OrganizeImportsAction.error.title"), inEditor))  
			return;
		try {
			IPreferenceStore store= PreferenceConstants.getPreferenceStore();
			String[] prefOrder= JavaPreferencesSettings.getImportOrderPreference(store);
			int threshold= JavaPreferencesSettings.getImportNumberThreshold(store);
			boolean ignoreLowerCaseNames= store.getBoolean(PreferenceConstants.ORGIMPORTS_IGNORELOWERCASE);
			
			if (!cu.isWorkingCopy()) {
				IEditorPart editor= EditorUtility.openInEditor(cu);
				if (editor instanceof JavaEditor) {
					fEditor= (JavaEditor) editor;
				}
				
				cu= JavaModelUtil.toWorkingCopy(cu);
			}			
			
			OrganizeImportsOperation op= new OrganizeImportsOperation(cu, prefOrder, threshold, ignoreLowerCaseNames, !cu.isWorkingCopy(), doResolve, createChooseImportQuery());