Bug 172574 [IDE] DeleteProjectDialog inconsequent selection behavior
Normally, choosing an option in an radio group can be done by clicking on the labels instead clicking on the buttons itself. As the "(Contents cannot be restored using "Undo")" text is in an extra label, clicking on it does nothing. I see me often clicking on that label to select the corresponding option. Attached is a little patch to select the correct radio when clicking on the extra label.
bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/DeleteResourceAction.java
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.graphics.FontMetrics;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.ide.undo.DeleteResourcesOperation;
import org.eclipse.ui.ide.undo.WorkspaceUndoUtil;
import org.eclipse.ui.internal.ide.IDEWorkbenchMessages;
import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
import org.eclipse.ui.internal.ide.IIDEHelpContextIds;
/**
 * Standard action for deleting the currently selected resources.
 * <p>
 * This class may be instantiated; it is not intended to be subclassed.
 * </p>
 */
public class DeleteResourceAction extends SelectionListenerAction {
	static class DeleteProjectDialog extends MessageDialog {
		private IResource[] projects;
		private boolean deleteContent = false;
		/**
		 * Control testing mode. In testing mode, it returns true to delete
		 * contents and does not pop up the dialog.