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 118992 - Existing packages not listed when creating new file in test package
Summary: Existing packages not listed when creating new file in test package
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P2 blocker (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-16 04:53 UTC by captainpinko
Modified: 2011-08-31 14:07 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
displays existing source pkg (39.18 KB, image/png)
2007-10-16 05:09 UTC, captainpinko
Details
when selecting test does not show existing source packages (39.31 KB, application/octet-stream)
2007-10-16 05:09 UTC, captainpinko
Details

Note You need to log in before you can comment on or make changes to this bug.
Description captainpinko 2007-10-16 04:53:27 UTC
I had created a new project using the default package name for NetBeans (i.e. the project name). I then created a new
file and selected for "Location" in the wizard "Source Packages" and the created package showed up in the drop-down for
"Package". However, when I created a new file and select for its "Location" to put it into "Test Packages" only the
"Default Package" appears but not the one NetBeans created from the project name.

It is common practise to have unit tests in the same package but in a separate directory since that allows unit testing
of package-level methods. It is not nice to have to go back and look up the name of the package you were using. While
this can be worked around with not too much difficulty, this is really basic functionality that should work and would be
commonly used.
Comment 1 captainpinko 2007-10-16 05:09:05 UTC
Created attachment 50996 [details]
displays existing source pkg
Comment 2 captainpinko 2007-10-16 05:09:56 UTC
Created attachment 50997 [details]
when selecting test does not show existing source packages
Comment 3 captainpinko 2007-10-16 05:13:28 UTC
I guess I should rephrase this as that packages that exist as source aren't being offered when creating a file for test.
Existing source packages should be listed when creating a test file, and then created if in fact they don't exist within
test yet. I suppose this could be argued  that this is a request for an enhancement but I'd disagree because this is
pretty basic stuff.
Comment 4 novakm 2007-10-22 10:52:50 UTC
Reassigning to openide - wizards for evaluation.
Comment 5 Tomas Zezula 2007-10-22 13:06:04 UTC
The package chooser displays only existing packages, populating the test packages chooser by test packages and source
packages should be even worse from the UI point of view. I am reassigning it to UI to evaluate. By the way you can
generate an unit test in NetBeans in much simpler way: Select java file in project's view and in it's pop up select
Tools/Create JUnit tests (shortcut Ctrl+Shift+U).