Bug 113338 [sort members] Usability improvements of sort members action
I20051018-0932 + ZRH plugin export from 20051021 - The sort members action unnecessarily shows a dialog prompting whether to sort fields as well or not. This seems interrupting and more or less useless, as it resembles more a preference, which is set once and left untouched. A better solution could be a MessageDialogWithToggle to attract the users attention to the potentially arising problems when sorting fields and guiding her to the members sort order preference page where she can configure the desired behavior - Invoking sort members on a type with less than 2 members pops up a dialog telling that there were not enough members to sort. This is interrupting and unnecessary as well IMHO.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/OptionalMessageDialog.java
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.Shell;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.JavaUIMessages;
/**
 * This is a <code>MessageDialog</code> which allows the user
 * to choose that the dialog isn't shown again the next time.
 */ 
public class OptionalMessageDialog extends MessageDialog {
	
	
	private static final String CHECKBOX_TEXT= JavaUIMessages.OptionalMessageDialog_dontShowAgain; 
	
	private static final String STORE_ID= "OptionalMessageDialog.hide."; 
	public static final int NOT_SHOWN= IDialogConstants.CLIENT_ID + 1;
	
	private Button fHideDialogCheckBox;
	private String fId;
	/**
	 * Opens the dialog but only if the user hasn't choosen to hide it.
	 * Returns <code>NOT_SHOWN</code> if the dialog was not shown.
	 */
	public static int open(String id, Shell parent, String title, Image titleImage, String message, int dialogType, String[] buttonLabels, int defaultButtonIndex) {
		if (!isDialogEnabled(id))