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.
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.
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.
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
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.
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.
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.
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.
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.
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.
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.
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
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.
I'll try to spare some time to check all wizards in apisupport and file issues. Probably next week.
http://hg.netbeans.org/core-main/rev/a6b6f1252e85
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