From 21277adca090362cb7ecd26e43ca4a92a44e1edd Mon Sep 17 00:00:00 2001 From: Uwe Stieber Date: Mon, 30 Jul 2007 09:37:40 +0000 Subject: [PATCH] [197937] [ui compliance] RSE Wizards needs to show errors within the standard wizard dialog message area --- .../ui/wizards/AbstractSystemWizardPage.java | 37 ++++++++++--------- .../ui/wizards/RSEDialogPageMessageLine.java | 10 ----- 2 files changed, 20 insertions(+), 27 deletions(-) diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/AbstractSystemWizardPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/AbstractSystemWizardPage.java index 5c3a9f2d394..506569630a3 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/AbstractSystemWizardPage.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/AbstractSystemWizardPage.java @@ -307,7 +307,7 @@ public abstract class AbstractSystemWizardPage */ public void clearErrorMessage() { - if (msgLine!=null && !msgLine.isDisposed()) + if (msgLine != null && getControl() != null && getControl().isDisposed()) msgLine.clearErrorMessage(); } @@ -316,7 +316,7 @@ public abstract class AbstractSystemWizardPage */ public void clearMessage() { - if (msgLine!=null && !msgLine.isDisposed()) + if (msgLine != null && getControl() != null && getControl().isDisposed()) msgLine.clearMessage(); } @@ -373,33 +373,36 @@ public abstract class AbstractSystemWizardPage pendingMessage = message; } - /* (non-Javadoc) - * @see org.eclipse.jface.wizard.WizardPage#setErrorMessage(java.lang.String) + /** + * Note: Never override this method as long the {@link ISystemMessageLine} + * construct is not eliminated from RSE! Overriding does lead easely to {@link StackOverflowError}s + * if the subclass implementation does call the wrong methods! * - * Never override this method as long the ISystemMessageLine construct is not - * eliminated! Overriding may easely lead to StackOverflowErrors. + * @see org.eclipse.jface.wizard.WizardPage#setErrorMessage(java.lang.String) */ - public final void setErrorMessage(String message) { + public void setErrorMessage(String message) { super.setErrorMessage(message); } - /* (non-Javadoc) - * @see org.eclipse.jface.wizard.WizardPage#setMessage(java.lang.String, int) + /** + * Note: Never override this method as long the {@link ISystemMessageLine} + * construct is not eliminated from RSE! Overriding does lead easely to {@link StackOverflowError}s + * if the subclass implementation does call the wrong methods! * - * Never override this method as long the ISystemMessageLine construct is not - * eliminated! Overriding may easely lead to StackOverflowErrors. + * @see org.eclipse.jface.wizard.WizardPage#setMessage(java.lang.String, int) */ - public final void setMessage(String newMessage, int newType) { + public void setMessage(String newMessage, int newType) { super.setMessage(newMessage, newType); } - /* (non-Javadoc) - * @see org.eclipse.jface.dialogs.DialogPage#setMessage(java.lang.String) + /** + * Note: Never override this method as long the {@link ISystemMessageLine} + * construct is not eliminated from RSE! Overriding does lead easely to {@link StackOverflowError}s + * if the subclass implementation does call the wrong methods! * - * Never override this method as long the ISystemMessageLine construct is not - * eliminated! Overriding may easely lead to StackOverflowErrors. + * @see org.eclipse.jface.dialogs.DialogPage#setMessage(java.lang.String) */ - public final void setMessage(String message) { + public void setMessage(String message) { super.setMessage(message); } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/RSEDialogPageMessageLine.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/RSEDialogPageMessageLine.java index 1190a08e9cb..525bda02c46 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/RSEDialogPageMessageLine.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/RSEDialogPageMessageLine.java @@ -33,16 +33,6 @@ public class RSEDialogPageMessageLine implements ISystemMessageLine { page = dialogPage; } - /** - * Returns if or if not the dialog page message line has been disposed. - * - * @return True when the dialog page message line is disposed, false otherwise. - */ - public boolean isDisposed() { - assert page != null; - return page.getControl() != null && page.getControl().isDisposed(); - } - /* (non-Javadoc) * @see org.eclipse.rse.ui.messages.ISystemMessageLine#clearErrorMessage() */