Community
Participate
Working Groups
MA (4/3/01 6:04:40 PM) The error and warning messages of the wizards have now been placed on the top of the page - The location is very unusual: It is placed over the description - (Warning) messages do not have an icon. When displayed, there is no difference between the descriptio and the message, which is quite confusing NOTES: MA (10.04.01 17:58:56) To reproduce: 1. Create a Java project 2. open the New class wizard 3. enter '1' as a class name -> error message is nicley visible 4. enter 'a$' as a class name -> warning message (set using setMessage)is at the exact same place as the wizard description (set by setDescription) EG (4/18/2001 5:06:48 PM) agreed, wizards should support to show a warning message with a warning icon. RG (5/4/01 5:18:30 PM) The current design is based on suggestions from usabilty in Toronto. Although the location is unusual, it has the advantage of having more space than showing messages and errors in the button bar. I think the important issue in this pr is that messages hide descriptions and that the two appear the same.
PRODUCT VERSION: 0.040
would be still nice to have a warning icon or info warning (see our jdt.ui.StatusDialog)
You are asking is that we visually differentiate between a description and a message. So we could show an info icon (similar to org.eclipse.ui\Eclipse JFace\org\eclipse\jface\dialogs\images\inform.gif) when a message is being displayed. A warning icon would not work because many messages are just information, not warnings. Would this be acceptable?
yes, the info icon would do the job! In our status dialogs we use IStatus to describe the error status. Severities are IStatus.ERROR, WARNING, INFO and OK. The info icon we use is jdt.ui/icons/full/obj16/info_obj.gif When you open the 'Override Methods' dialog and select an entry you will see it.
API added to WizardPage/TitleAreaDialog to display an icon for info and warning messages
can I suggest to add the new API to DialogPage directly? Note that also preference pages have the same problem. The current handling of setting a message is quite tricky. To set an error message: setErrorMessage To set a warning: setErrorMessage(null), setMessage("message', INFO_MESSAGE) I suggest to introduce a method setStatusMessage(String message, int status) where status is IStatus.ERROR, IStatus.WARNING, IStatus.INFO, IStatus.OK) (you could deprecate setErrorMessage and setMessage then)
The behavior is such that an error message overrides a message. A message is not shown until the error message is set to null. The new api just shows an icon with a message. Do you think this will be clear if we change it to a single method?
ok I see, so you say that typically setMessage is only set once, and depending on status setErrorMessage is changing. Then it would make more sense to add the warning / info statement to setErrorMessage setErrorMessage(String message, int status) where status is IStatus.ERROR, IStatus.WARNING, IStatus.INFO
The difficulty is this won't solve the orginal problem (message looks like the description). It would force clients to call setErrorMessage all the time and they would lose the "error replaces message" logic. As it is now clients can change their code from setMessage(m) to setMessage(m,INFO_MESSAGE) and the problem is solved. BTW I considered making this the defualt - setMessage(m) just forwards to setMessage(m,INFO_MESSAGE) - but thought some clients may not want this for free.
I never liked the setErrorMessage/setMessage duality (I had to add a extra helper method to correctly handle it), so I was hoping that we can simplify it. Note that the other reason for reopening was to say that also DialogPage should have the new method
Defined IMessageProvider and made DialogPage implement this. This interface defines the following message type contants NONE, INFORMATION, WARNING, ERROR Dialog page now has api to set a message eith one of this types. Both TitleAreaDialog (WizardDialog) and PreferenceDialog check for this new API and will display an icon indicating the message type. Note that for backward compatibility, a message of type ERROR is different than an error message (set using setErrorMessage). JFaceResource now contains the following images Dialog.DLG_IMG_MESSAGE_INFO Dialog.DLG_IMG_MESSAGE_WARNING Dialog.DLG_IMG_MESSAGE_ERROR Dialogs may use these rather than using their own.