String message = LaunchConfigurationsMessages.DebugModePromptStatusHandler_1; MessageDialogWithToggle dialog = MessageDialogWithToggle.openYesNoCancelQuestion(activeShell, title, message, null, false, store, IInternalDebugUIConstants.PREF_RELAUNCH_IN_DEBUG_MODE); int buttonId = dialog.getReturnCode(); if (buttonId == IDialogConstants.YES_ID) {
public boolean continueWorkingOperation(ProfileChangeOperation operation, Shell shell) { // don't continue if superclass has already identified problem scenarios boolean ok = super.continueWorkingWithOperation(operation, shell); if (!ok) return false; IProvisioningPlan plan = operation.getProvisioningPlan(); if (plan == null) return false; // Check the preference to see whether to continue. IPreferenceStore prefs = ProvSDKUIActivator.getDefault().getPreferenceStore(); String openPlan = prefs.getString(PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN); if (MessageDialogWithToggle.ALWAYS.equals(openPlan)) { return true; } if (MessageDialogWithToggle.NEVER.equals(openPlan)) { StatusManager.getManager().handle(plan.getStatus(), StatusManager.SHOW | StatusManager.LOG); return false; } MessageDialogWithToggle dialog = MessageDialogWithToggle.openYesNoCancelQuestion(shell, ProvSDKMessages.ProvSDKUIActivator_Question, ProvSDKMessages.ProvSDKUIActivator_OpenWizardAnyway, null, false, prefs, PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN); // Any answer but yes will stop the performance of the plan, but NO is interpreted to mean, show me the error. if (dialog.getReturnCode() == IDialogConstants.NO_ID) StatusManager.getManager().handle(plan.getStatus(), StatusManager.SHOW | StatusManager.LOG); return dialog.getReturnCode() == IDialogConstants.YES_ID; } }
MessageDialogWithToggle dialog = MessageDialogWithToggle.openYesNoCancelQuestion(getShell(), DebugUIMessages.DebugUIPlugin_23, DebugUIMessages.DebugUIPlugin_24, null, false, store, IInternalDebugUIConstants.PREF_WAIT_FOR_BUILD); //
if (wait) { // if there are build jobs running, do we wait or not?? if (waitPref.equals(MessageDialogWithToggle.PROMPT)) { MessageDialogWithToggle dialog = MessageDialogWithToggle.openYesNoCancelQuestion(getShell(), DebugUIMessages.DebugUIPlugin_23, DebugUIMessages.DebugUIPlugin_24, null, false, store, IInternalDebugUIConstants.PREF_WAIT_FOR_BUILD); // switch (dialog.getReturnCode()) { case IDialogConstants.CANCEL_ID: