Bug 1903 - Wizards: message looks like description (1GBM6UL)
Summary: Wizards: message looks like description (1GBM6UL)
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: All Windows NT
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Randy Giffen CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-10 22:21 EDT by Martin Aeschlimann CLA
Modified: 2002-04-15 12:36 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Aeschlimann CLA 2001-10-10 22:21:56 EDT
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.
Comment 1 DJ Houghton CLA 2001-10-24 06:49:33 EDT
PRODUCT VERSION:
	0.040

Comment 2 Martin Aeschlimann CLA 2002-01-23 11:11:29 EST
would be still nice to have a warning icon or info warning
(see our jdt.ui.StatusDialog)
Comment 3 Randy Giffen CLA 2002-01-23 11:54:38 EST
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?
Comment 4 Martin Aeschlimann CLA 2002-01-23 13:20:06 EST
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.
Comment 5 Randy Giffen CLA 2002-03-22 15:27:55 EST
API added to WizardPage/TitleAreaDialog to display an icon for info and 
warning messages
Comment 6 Martin Aeschlimann CLA 2002-04-02 04:53:17 EST
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)

Comment 7 Randy Giffen CLA 2002-04-02 08:45:36 EST
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?
Comment 8 Martin Aeschlimann CLA 2002-04-02 10:12:54 EST
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



Comment 9 Randy Giffen CLA 2002-04-02 10:44:11 EST
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.

Comment 10 Martin Aeschlimann CLA 2002-04-02 12:11:55 EST
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

Comment 11 Randy Giffen CLA 2002-04-15 12:36:56 EDT
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.