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 62828 - Name of module project in wizard should be checked
Summary: Name of module project in wizard should be checked
Status: VERIFIED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 5.x
Hardware: All All
: P4 blocker (vote)
Assignee: Martin Krauskopf
URL:
Keywords: SIMPLEFIX
Depends on:
Blocks:
 
Reported: 2005-08-23 09:30 UTC by Tomas Danek
Modified: 2005-11-11 13:23 UTC (History)
0 users

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 2005-08-23 09:30:19 UTC
When creating a module suite from template wizard, I'm able to create module
suite with name "*45&^$#@!"..UI spec does not tell anything about this, but I
suppose name of project should be IDENTIFIER. I notice this in module suite
wizard, but this is probably general problem of all three wizards.

Suggested solution: Name should be checked and next or finish button is
disabled, until name is valid.
Comment 1 Martin Krauskopf 2005-08-23 09:36:32 UTC
Yes, we could check whether a directory with such a name can be created by e.g.
calling File.mkdir(). Probably when the user click the Next button
(WD.ValidatingPanel).
Comment 2 Tomas Danek 2005-08-23 09:52:36 UTC
I found that it's a problem of all project wizards, even J2SE,WEB,...! Martine,
please add to CC someone who owns the proper code (maybe Honza Lahoda?!). Thanks!
Comment 3 Jesse Glick 2005-08-23 11:30:03 UTC
You should not call File.mkdir() before Finish is pressed since that would
violate the user's expectations that he can cancel at any time. But it would
suffice to exclude some obviously dangerous characters, I guess.

A project name need not be an identifier; '-' is OK. The code name base is
however tightly restricted.
Comment 4 Martin Krauskopf 2005-08-23 11:49:55 UTC
Of course, File.mkdir() followed immediatelly by File.delete(). Somethink like
if(f.mkdir() && f.delete()) dosomething; or whatever.
I believe we shouldn't restrict user to created whatever directory which is
permitted to created on the user's OS.
Comment 5 Tomas Danek 2005-08-24 11:21:22 UTC
On windows is dispatching of the name ok, so as Martin says - if OS let's you
create folder wit weird name, it's not businnes of IDE to check it more
straightly. But not closing as wontfix, because some horrible names lead to an
exception (see issue 62833)
Comment 6 Martin Krauskopf 2005-11-09 13:45:15 UTC
Fixed.

Checking in ui/wizard/BasicInfoVisualPanel.form; 1.18 -> 1.19;
Checking in ui/wizard/BasicInfoVisualPanel.java; 1.43 -> 1.44;
Checking in ui/wizard/BasicInfoWizardPanel.java; 1.13 -> 1.14;
Checking in ui/wizard/Bundle.properties; 1.28 -> 1.29;
Comment 7 Tomas Danek 2005-11-11 13:23:04 UTC
verified in beta2