Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 271935

Summary: New type wizard suppresses too many errors
Product: [Eclipse Project] PDE Reporter: Stephan Herrmann <stephan.herrmann>
Component: UIAssignee: PDE-UI-Inbox <pde-ui-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: bokowski, curtis.windatt.public, daniel_megert, marco
Version: 3.5   
Target Milestone: ---   
Hardware: Other   
OS: All   
Whiteboard:
Attachments:
Description Flags
simple proposed patch none

Description Stephan Herrmann CLA 2009-04-11 09:11:43 EDT
Build ID: I20090313-0100

When a new type wizard is initialized with invalid data,
e.g., an illegal package name, it correctly disables
the finish button, but gives no message about the reason.

To reproduce open the PDE's extension editor, create a new
extension, say org.eclipse.core.runtime.applications and
a "run" element. In the class field change the qualified
name to contain a Java identifier like:
   my.package.Application
click on the "class*" link to open the new type wizard.
-> Finish is disabled, but status line just says:
  "Create a new java class".

Even if the path leading to this situation my look stupid
the user should IMHO always be informed about why "finish"
cannot be selected.
Comment 1 Stephan Herrmann CLA 2009-04-11 09:21:54 EDT
Created attachment 131544 [details]
simple proposed patch

The attached patch would solve this issue for the new class wizard.
Sibling wizards would need to be adjusted accordingly.
Comment 2 Stephan Herrmann CLA 2009-04-11 09:22:58 EDT
fixed typo in the title, sorry for the noise.
Comment 3 Dani Megert CLA 2009-04-14 03:56:39 EDT
According to the UI guidelines a wizard must never open with an error. You also see this when opening a wizard with no selection: the required input is empty and 'Finish' disabled.

The correct fix is to show the error in the PDE wizard and maybe not allow to click the link.
Comment 4 Stephan Herrmann CLA 2009-04-14 06:58:44 EDT
(In reply to comment #3)
> According to the UI guidelines a wizard must never open with an error.

I understand this is meant not to blame the user for any errors which
he hadn't yet had a chance to correct.

> You also see this when opening a wizard with no selection: the required
> input is empty and 'Finish' disabled.

literally, this is the same, but here entering a type name is the first
thing the user will do in that dialog anyway, and if he misses to do
so, leaving that field will trigger the error message.

In the case that I reported, the user might do lots of editing in the
wizard and never see the error message, which is BAD.

> The correct fix is to show the error in the PDE wizard and maybe not allow to
> click the link.

So, the "correct fix" would be to ensure that ALL plug-ins that open a
new type wizard ensure that it is NEVER initialized with invalid data.
Idealistically, this is OK. But I don't see this happen.
As for the PDE example: is it really desirable that the PDE fully ensures
all Java rules, rather than this being implemented centrally in the JDT?

So, actually I would plead to define the UI guidelines more precisely to
say a wizard must not report as an error, what a user is going to fill
in as the first action. But fields that are not on the mandatory path
of clicking through a wizard must be reported at some point, be it when
the wizard is opened.
Comment 5 Curtis Windatt CLA 2009-04-14 08:50:58 EDT

*** This bug has been marked as a duplicate of bug 262612 ***
Comment 6 Stephan Herrmann CLA 2009-04-27 13:35:51 EDT
I don't see Bug 262612 being resolved for 3.5, but we do have a 
patch for *this* bug.

Please note, that the scenario here is different than in Bug 262612:
Here I was speaking about an error in the package field, which the
user may never visit, thereby causing heavy confusion.
Bug 262612 speaks about an error in the name field, which has the
focus when the dialog is opened, so finding the error in this field
is more likely.

If all clients of this wizard behave well the patch will
simply have no effect (thus UI guidelines will be adhered to), 
but for the time being it gives users some urgently needed info.
A un-finishable wizard with no explanation is a severe usability bug IMO.

Comment 7 Dani Megert CLA 2009-04-27 14:48:02 EDT
As said, we won't apply this patch. Feel free to make a patch for PDE.
Comment 8 Boris Bokowski CLA 2009-05-14 17:04:52 EDT
(In reply to comment #3)
> According to the UI guidelines a wizard must never open with an error.

Not sure if this rule applies in this case, since the user entered the invalid data in the first place. I guess it is hard to tell on the JDT side though if the invalid data is indeed provided by the end user.

(In reply to comment #4)
> In the case that I reported, the user might do lots of editing in the
> wizard and never see the error message, which is BAD.

This would indeed be bad, but when I tried this, typing in any text field will update the status information, even if it not the package field that you are typing in. I'd argue that the user is likely able to overcome their confusion.

(In reply to comment #3)
> The correct fix is to show the error in the PDE wizard and maybe not allow to
> click the link.

Agreed, this would be better.
Comment 9 Stephan Herrmann CLA 2009-05-15 09:14:29 EDT
(In reply to comment #8)
> (In reply to comment #4)
> > In the case that I reported, the user might do lots of editing in the
> > wizard and never see the error message, which is BAD.
> 
> This would indeed be bad, but when I tried this, typing in any text field will
> update the status information, even if it not the package field that you are
> typing in. I'd argue that the user is likely able to overcome their confusion.

Wow, you're right. I'm not sure why I missed that; I obviously
only clicked around in the dialog without entering any text.
I _could_ argue that apparently I was just too confused(!) because
I couldn't directly hit Finish as I usually do in this workflow.
Still I should have tried that exact scenario before writing here, sorry.

Agreeing to close as duplicate of bug 262612.




*** This bug has been marked as a duplicate of bug 262612 ***