1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-15 13:05:22 +02:00

[232670] SystemMessageDialog should not throw IndicatorExceptions

This commit is contained in:
David McKnight 2008-05-20 20:31:12 +00:00
parent 64d8b908b1
commit 8f868a9feb

View file

@ -19,6 +19,7 @@
* David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
* David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
* Martin Oberhuber (Wind River) - Adding Javadoc * Martin Oberhuber (Wind River) - Adding Javadoc
* David McKnight (IBM) - [232670] SystemMessageDialog should not throw IndicatorExceptions
*******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.ui.messages; package org.eclipse.rse.ui.messages;
@ -35,7 +36,6 @@ import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.window.Window; import org.eclipse.jface.window.Window;
import org.eclipse.rse.internal.ui.GenericMessages; import org.eclipse.rse.internal.ui.GenericMessages;
import org.eclipse.rse.internal.ui.SystemResources; import org.eclipse.rse.internal.ui.SystemResources;
import org.eclipse.rse.services.clientserver.messages.IndicatorException;
import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.services.clientserver.messages.SystemMessage;
import org.eclipse.rse.services.clientserver.messages.SystemMessageException; import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
import org.eclipse.rse.ui.ISystemMessages; import org.eclipse.rse.ui.ISystemMessages;
@ -482,14 +482,11 @@ public class SystemMessageDialog extends ErrorDialog implements Listener {
* Open the dialog with Yes, No, Details button for an Inquiry/Question * Open the dialog with Yes, No, Details button for an Inquiry/Question
* message. * message.
* *
* @throws IndicatorException if the message is not an Inquiry message
* @return <code>true</code> if Yes was pressed, <code>false</code> if * @return <code>true</code> if Yes was pressed, <code>false</code> if
* No was pressed. * No was pressed.
*/ */
public boolean openQuestion() throws IndicatorException public boolean openQuestion()
{ {
if (message.getIndicator()!=SystemMessage.INQUIRY)
throw new IndicatorException("Message "+message.getFullMessageID()+" is not an inquiry message."); //$NON-NLS-1$ //$NON-NLS-2$
yesNoButtons=true; yesNoButtons=true;
open(); open();
return (buttonIdPressed==IDialogConstants.YES_ID); return (buttonIdPressed==IDialogConstants.YES_ID);
@ -497,8 +494,7 @@ public class SystemMessageDialog extends ErrorDialog implements Listener {
/** /**
* Open the dialog with Yes/No, Details button for an Inquiry/Question * Open the dialog with Yes/No, Details button for an Inquiry/Question
* message. Eats up the IndicatorException, so only call this when you know * message.
* what you are doing!
* *
* @return <code>true</code> if Yes was pressed, <code>false</code> if * @return <code>true</code> if Yes was pressed, <code>false</code> if
* No was pressed. * No was pressed.
@ -510,8 +506,7 @@ public class SystemMessageDialog extends ErrorDialog implements Listener {
/** /**
* opens the dialog with an optional Yes/No or OK, Details button for an * opens the dialog with an optional Yes/No or OK, Details button for an
* Inquiry/Question message. Eats up the IndicatorException, so only call * Inquiry/Question message.
* this when you know what you are doing!
* *
* Before RSE 3.0, this method had no arguments. Since RSE 3.0, it is taking * Before RSE 3.0, this method had no arguments. Since RSE 3.0, it is taking
* a boolean argument. * a boolean argument.
@ -527,7 +522,6 @@ public class SystemMessageDialog extends ErrorDialog implements Listener {
/** /**
* opens the dialog with Yes, No, Cancel Details for an Inquiry/Question message * opens the dialog with Yes, No, Cancel Details for an Inquiry/Question message
* throws an IndicatorException if the indicator is not Inquiry
* @return IDialogConstants.YES_ID or NO_ID * @return IDialogConstants.YES_ID or NO_ID
*/ */
public int openYesNoCancel() public int openYesNoCancel()