This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 138003 - Default error message in new module wizard
Summary: Default error message in new module wizard
Status: RESOLVED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: rmichalsky
URL:
Keywords: UI
Depends on: 137737
Blocks:
  Show dependency tree
 
Reported: 2008-06-23 18:17 UTC by Tomas Danek
Modified: 2008-07-17 04:41 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Danek 2008-06-23 18:17:14 UTC
Product Version: NetBeans IDE Dev (Build 200806231203)
Java: 1.6.0_04; Java HotSpot(TM) Client VM 10.0-b19
System: Linux version 2.6.24-19-generic running on i386; UTF-8; en_US (nb)
Userdir: /tmp/ud
-----------------
New module wizard panel #3: 
User gets by default error message about invalid code name base, which is wrong from HIE point of view. CCing Jano
Rojcek to suggest correct behavior.
Comment 1 Jesse Glick 2008-06-23 20:34:11 UTC
This is intentional - encourages people to actually enter a CNB. Otherwise people lazily accept the defaults in the
wizard, probably without even reading them, and we actually get org-yourorghere-something.jar's submitted as real modules.
Comment 2 jrojcek 2008-06-24 11:34:41 UTC
Instead of the error icon, it should show the information icon and black text. The reason for not showing the error message is described at:
http://wiki.netbeans.org/InformationIcons

Comment 3 Jesse Glick 2008-06-24 18:05:35 UTC
I have no idea how to implement this. The current code just calls

wizardDescriptor.putProperty("WizardPanel_errorMessage", "Code Name Base is not valid");

or similar. AFAICT there is no analogous property for informational messages defined in WizardDescriptor.
Comment 4 jrojcek 2008-06-25 15:23:28 UTC
We asked Jirka Rechtacek to implement the API for information messages.

This is the IDE-wide effort we want to accomplish for 6.5. We also consider it important from UI perspective.
Comment 5 rmichalsky 2008-06-30 16:22:27 UTC
The change would be easy with new API for informational message, but does the description at
http://wiki.netbeans.org/InformationIcons apply to the discussed error message? The page states that:
   "Whenever a non-empty value is invalid, an error message should be displayed."
and (in bold):
   "Information messages and the information icon should only be displayed when a required value is set to an empty
value by default."

Default value in wizard is "org.<yourorghere>.modulename" or similar which is invalid but gives a hint how a code name
base should look like. Showing empty value for code name base would IMHO confuse user more than the error message.
Comment 6 jrojcek 2008-06-30 16:59:07 UTC
This is a good point.

Default values are in many cases just placeholders (e.g. JavaApplication15). Users use them to save time when playing with features. In case of module 
development, it seem people play with it and they end up producing something they want to publish. The user interacts with the code name base probably 
only in the wizard and then forgets about it as it's probably not visible anywhere else when developing modules. If it's in project properties, it's well 
hidden. Why people submit it as real modules? That I have no idea.

What I would suggest is to get rid of the error message altogether and change the default value to something like:
org.<module1name> (e.g. "org.module1").

Below the text field, we could show some hint how it is used. E.g.
Module JAR name will be "org.<modulename>".

In that case if users don't modify it, it is still reasonable. If the user is okay with "module5" as a project name, than we can do nothing about it.
Comment 7 Jesse Glick 2008-06-30 20:12:51 UTC
I disagree. There is no reasonable default for this field. "org.module1" is just as bad as "org.yourorghere.module1".
Unlike Java packages, you cannot reasonably change a module CNB after the fact; you have to choose something now.
Comment 8 jrojcek 2008-07-01 10:32:32 UTC
In that case just leave the field empty and give the user some hint below the field how a good base name looks like:
-
e.g. "org.netbeans.contrib.modulename" or "com.yourcompany.modulename"
-

or something similar.

Then show the information icon at the bottom of the dialog.
Comment 9 rmichalsky 2008-07-02 10:11:47 UTC
I'm not quite convinced yet that empty text box (albeit with a hint below) and info message is more user-friendly than
pre-filled text box + error message. Next button is disabled anyway and user cannot ignore the message and continue his
work, which is unusual for info messages. Also an empty text box is IMHO more frightening :) that one in which user just
must make some changes. 

But if that's how you want it (empty box + hint below + info), I can do it.
Comment 10 jrojcek 2008-07-03 10:33:07 UTC
Maybe the Eclipse guidelines will convince you. ;-) They claim it's a #7 in their Top Ten UI guidelines:
http://wiki.eclipse.org/index.php/UI_Best_Practices_v3.x

More details:
http://wiki.eclipse.org/User_Interface_Guidelines#Initialization_2
Comment 11 rmichalsky 2008-07-03 11:59:10 UTC
You know, they don't get it always right either ;-). But as I wrote I'll do it, it was just my opinion.

Also there are other apisupport wizards with the same behaviour (New Language Support, New File Type, ...?), you
probably want to file issues for them as well if your haven't already done so.
Comment 12 Tomas Danek 2008-07-03 12:04:56 UTC
I'll try to spare some time to check all wizards in apisupport and file issues. Probably next week.
Comment 14 Quality Engineering 2008-07-17 04:41:18 UTC
Integrated into 'main-golden', available in NB_Trunk_Production #324 build
Changeset: http://hg.netbeans.org/main/rev/a6b6f1252e85
User: Richard Michalsky <rmichalsky@netbeans.org>
Log: #138003: empty code name base + info message