diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/DisplayHidableSystemMessageAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/DisplayHidableSystemMessageAction.java index be1c441a05c..35ccdb493e6 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/DisplayHidableSystemMessageAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/DisplayHidableSystemMessageAction.java @@ -6,6 +6,7 @@ * * Contributors: * Michael Berger (IBM) - Initial API and implementation + * David McKnight (IBM) - [216596] determine whether to show yes/no or just okay ********************************************************************************/ package org.eclipse.rse.ui.actions; @@ -20,12 +21,22 @@ public class DisplayHidableSystemMessageAction extends { protected IPreferenceStore _store; protected String _prefID; + protected boolean _showYesNo = true; + public DisplayHidableSystemMessageAction(SystemMessage message, IPreferenceStore prefStore, String prefID) { super(message); _store = prefStore; _prefID = prefID; } + + public DisplayHidableSystemMessageAction(SystemMessage message, IPreferenceStore prefStore, String prefID, boolean showYesNo) + { + super(message); + _store = prefStore; + _prefID = prefID; + _showYesNo = showYesNo; + } /** * @see Runnable#run() @@ -38,10 +49,10 @@ public class DisplayHidableSystemMessageAction extends if (shells[loop].isEnabled() && shells[loop].isVisible()) { SystemMessageDialog dialog = new SystemMessageDialog(shells[loop], message); dialog.setNoShowAgainOption(true, _store, _prefID, false); - dialog.openQuestionNoException(); + dialog.openQuestionNoException(_showYesNo); rc = dialog.getButtonPressedId(); finished = true; - } + } } } } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/SystemMessageDialog.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/SystemMessageDialog.java index 47704566528..480cc05e8af 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/SystemMessageDialog.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/SystemMessageDialog.java @@ -14,6 +14,7 @@ * Martin Oberhuber (Wind River) - [183824] Forward SystemMessageException from IRemoteFileSubsystem * Martin Oberhuber (Wind River) - [187115] force SystemMessageDialog always into Display thread * Martin Oberhuber (Wind River) - [189272] exception when canceling ssh connect + * David McKnight (IBM) - [216596] determine whether to show yes/no or just okay ********************************************************************************/ package org.eclipse.rse.ui.messages; @@ -443,13 +444,23 @@ public class SystemMessageDialog extends ErrorDialog implements Listener { open(); return (buttonIdPressed==IDialogConstants.YES_ID); } + /** - * opens the dialog with Yes, No, Details button for an Inquiry/Question message. + * opens the dialog with Yes/No, Details button for an Inquiry/Question message. * Eats up the IndicatorException, so only call this when you know what you are doing! */ public boolean openQuestionNoException() { - yesNoButtons=true; + return openQuestionNoException(true); + } + + /** + * opens the dialog with an optional Yes/No or OK, Details button for an Inquiry/Question message. + * Eats up the IndicatorException, so only call this when you know what you are doing! + */ + public boolean openQuestionNoException(boolean showYesNo) + { + yesNoButtons=showYesNo; open(); return (buttonIdPressed==IDialogConstants.YES_ID); }