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.
Summary: | Can't create parent packages after child packages have been created. | ||
---|---|---|---|
Product: | java | Reporter: | jonescb |
Component: | Project | Assignee: | Tomas Zezula <tzezula> |
Status: | REOPENED --- | ||
Severity: | normal | CC: | mclaborn |
Priority: | P3 | ||
Version: | 6.x | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Issue Type: | ENHANCEMENT | Exception Reporter: |
Description
jonescb
2010-06-02 17:07:17 UTC
You don't have to create the existing package. When you need to create a file in it just type the package name (or select a child package and delete the child part of the name) in the new (Class|File) wizard and the package will appear. The IDE shows only non empty packages, when the package will contain a file it will be shown. You can also switch the package view to the folder view by View Java Packages As action in the Project's View. You are correct that entering the package name in the New Class Wizard works, however when a new package is created via the New Package wizard, the package is shown even though it's empty. You stated that empty packages aren't shown, but they are. So the wizard should not say that the package already exists. It should simply make the non-visible package visible. And it would be greyed out like any other empty package created by the Wizard. Yes, there are workarounds. But using the New Package wizard is an obvious choice for most users for making new packages, and it shouldn't show errors for something that it can easily work around. It isn't broken functionality, but I think by implementing this it would create a better user experience. By closing this as wontfix you're essentially saying that all users should be aware of semi-obscure workarounds, even if it isn't what would first come to mind. >You stated that empty packages aren't shown, but they are. Sorry, I've meant non leaf packages. >By closing this as wontfix you're essentially saying that all users should be aware of semi-obscure >workarounds, even if it isn't what would first come to mind. I don't think that the workarounds are obscure. You specify the non leaf package in the wizard and when it contains a file IDE will split it. I agree that the error message is strange and should be changed. Splitting the package by new package wizard is also possible but it may slowdown and complicate the PackageViewChildren. Also what should happen after IDE restart when only package was created but it's still empty? Should it be persistent? This will slow down the package view even more. But I can reopen it as an ENHANCEMENT when more users complain about this. For the persistence issue, I don't think it needs to be persistent. If Netbeans gets restarted the worst case scenario is that the user needs to run through the Wizard again, which AFAIK shouldn't duplicate anything. However, it might create bug reports like "Where did my package go?" Just my workflow is that I create a package when needed using the package wizard, then I immediately put a class in it by right clicking the new package and select New Java Class. But when I couldn't get the package to be visible (and right clickable), I didn't really know what to do. *** Bug 201115 has been marked as a duplicate of this bug. *** |