Bug 54347 [Dialogs] Provide "Yes No Always Never" dialog
In Debug UI, we define a dialog that prompts the user to answer Yes, No, Always, or Never. If anyone's interested, this code is generic and could be shipped as a JFace component. The dialog is in the org.eclipse.debug.ui project; the type name is AlwaysNeverDialog. The dialog supports passing in a preference store and preference key for the dialog to persist an Always or Never selection. For cases where clients don't have a preference store but still want to be able to get at the user's response, it alternatively supports passing in a string buffer where the dialog will store the "always/never/prompt" status.
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDEWorkbenchAdvisor.java
import org.eclipse.ui.WorkbenchException;
import org.eclipse.ui.application.IActionBarConfigurer;
import org.eclipse.ui.application.IWorkbenchConfigurer;
import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
import org.eclipse.ui.application.WorkbenchAdvisor;
import org.eclipse.ui.ide.IDE;
import org.eclipse.ui.internal.AboutInfo;
import org.eclipse.ui.internal.IWorkbenchGraphicConstants;
import org.eclipse.ui.internal.ide.dialogs.MessageDialogWithToggle;
import org.eclipse.ui.internal.ide.dialogs.WelcomeEditorInput;
import org.eclipse.ui.internal.ide.model.WorkbenchAdapterBuilder;
import org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog;
import org.eclipse.ui.part.EditorInputTransfer;
import org.eclipse.ui.part.MarkerTransfer;
import org.eclipse.ui.part.ResourceTransfer;
import org.eclipse.update.core.SiteManager;
/**
 * IDE-specified workbench advisor which configures the workbench for use as
 * an IDE.
 * <p>
 * Note: This class replaces <code>org.eclipse.ui.internal.Workbench</code>.
 * </p>
 * 
 * @since 3.0
 */
public class IDEWorkbenchAdvisor extends WorkbenchAdvisor {
	private static final String ACTION_BUILDER = "ActionBuilder"; 
	private static final String WELCOME_EDITOR_ID = "org.eclipse.ui.internal.ide.dialogs.WelcomeEditor"; 
	private static final String WORKBENCH_PREFERENCE_CATEGORY_ID = "org.eclipse.ui.preferencePages.Workbench"; 
	/**