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 33063 - Do not allow new Java package action on non-Java packages.
Summary: Do not allow new Java package action on non-Java packages.
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: Sun Solaris
: P2 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-04-18 18:50 UTC by Martin Entlicher
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Entlicher 2003-04-18 18:50:19 UTC
New -> Java Package
Fill in an invalid path:
src.org.netbeans.modules.vcscore.test-package
Press Finish
A dialog will popup saying that
"vcscore.test-package" is not a valid package
name. I don't know why it includes the vcscore
there, but O.K. I change test-package to
testpackage. But when pressing Finish it keeps me
saying, that "vcscore.test-package" is not a valid
package name!

So copy the text, cancel the wizard and launch the
wizard again. Paste in:
src.org.netbeans.modules.vcscore.testpackage
It still keeps me saying that
"vcscore.test-package" is not a valid package
name!

I consider this as a showstopper, there is no
workaround.
The only workaround is to use periodically New ->
Folder, which is quite annoying. You can NOT use
New -> Java Package on any subnodes of the
affected node (thus New -> Folder "src" and then
New -> Java Package "org.netbeans.modules.vcscore"
on the src node does not work as well)!

Build #200304172350, 3.5 Beta.
Comment 1 Jan Becicka 2003-04-22 08:26:37 UTC
Sorry, I cannot reproduce it on nevada 030417 on Linux.
I tried both (File | New | Java Package and Explorer popup | New |
Java Package) and it worked.
I filled "src.org.netbeans.modules.vcscore.test-package" and pressed
Finish.
A warning dialog saying that
"src.org.netbeans.modules.vcscore.test-package" is not a valid package
name appeared. I pressed OK, corrected the package name and pushed
finish button again.
Package src.org.netbeans.modules.vcscore.testpackage was successfully
created.

BTW it looks like you don't have mounted your source files correctly.
You must mount "src" directory, not its parent directory. Otherwise
source hierarchy and compilation will not work.
Comment 2 Jan Becicka 2003-04-22 10:59:40 UTC
Sorry, closing as invlaid. I cannot reproduce it on Windows. Please
reopen this issue if you are able to reproduce it on latest build. Thanks
Comment 3 Martin Entlicher 2003-04-22 11:39:10 UTC
This might be considered as a user error, although it was not clear to
me what's wrong at first sight.

The problem was, that I created "vcscore/test-package" directories by
New -> Folder. Then I needed to created a directory structure for a
module, so I decided to use New -> Java Package and create
"src.org.netbeans.modules.vcscore.test-package". This was not alloed,
because the existing "vcscore/test-package" directories are not a
valid Java packages. So if I create New -> Folder "src", then mount
"src" as a filesystem and create the rest, it works.

Less confusing would be if New -> Java Package would not be present on
"vcscore/test-package" at all, because the action is unusable anyway,
so please consider this as an enhancement.
Comment 4 Martin Entlicher 2003-04-22 11:39:52 UTC
Reopening as an enhancement.
Comment 5 Martin Matula 2004-11-10 15:29:56 UTC
This is now more intuitive, since new pacakge wizard now displays
whole package name, so you exactly know what package name you are
trying to create and why it is not valid. I do not consider this
request relevant anymore.