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
}
		return false;
	}
	
	private boolean hasSourceFolders(IJavaProject project) throws JavaModelException {
		IPackageFragmentRoot[] roots= project.getPackageFragmentRoots();
		for (int i= 0; i < roots.length; i++) {
			IPackageFragmentRoot root= roots[i];
			if (root.getKind() == IPackageFragmentRoot.K_SOURCE) {
				return true;
			}
		}
		return false;
	}
	/* (non-Javadoc)
	 * Method declared on SelectionDispatchAction.
	 */
	protected void run(ITextSelection selection) {
		IWorkingCopyManager manager= JavaPlugin.getDefault().getWorkingCopyManager();
		ICompilationUnit cu= manager.getWorkingCopy(fEditor.getEditorInput());
		runOnSingle(cu, true, true);
	}
	
	/* (non-Javadoc)
	 * Method declared on SelectionDispatchAction.
	 */
	protected void run(IStructuredSelection selection) {
		ICompilationUnit[] cus= getCompilationUnits(selection);
		if (cus.length == 1) {
			runOnSingle(cus[0], true, false);