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.
Often when working on a Java project there is a chain of package identifiers that don't provide any use to navigation since they are common to all packages. For example, I can work a project for my company, which in our standards we also include our division, so every package starts with com.mycompany.division So my product package would be com.mycompany.division.product In navigation the "com.mycompany.division" provides no benefit, since every package starts with it (arguably, within the context of the project, product provides no benefit either); in fact "com.mycompany.division" decreases usability by forcing users to scroll right to see the full package names. Instead of the following list in navigation: - com.mycompany.division.product.packagea - com.mycompany.division.product.packagea.packageb - com.mycompany.division.product.packagea.packagec - com.mycompany.division.product.packaged - com.mycompany.division.product.packaged.packagee.packagef I would prefer to see - ...product.packagea - ...product.packagea.packageb - ...product.packagea.packagec - ...product.packaged - ...product.packaged.packagee.packagef The ellipses would indicates that there is more to the package. I think there's two ways to go about implementing this enhancement. 1) Automatically determine which packages have members and don't show any common packages that share common names with all packages and no members. The problem with this approach is that if you enable it by default it will undoubtedly confuse users. Secondly, when you're first creating a project this could be confusing as it might automatically collapse things that you don't expect, just because you're in the middle of creation. 2) Create a project option to specify the part of the package name you would like to hide. The downside of this approach is that the user has to know about the option and because of that it's usage would be limited. It also requires more work for the user, but is the safer option for a user experience point of view.
Have you tried Reduced View mode in the project view? (right click at free space in project view and select View Java Packages As -> Reduced Tree)
*** Bug 242740 has been marked as a duplicate of this bug. ***
The reduced tree can be used, but either shows too much, or too little. For example, if I have the following packages and classes com.mycompany.division.product.packagea com.mycompany.division.product.packageb com.mycompany.division.product.packageb.packagec com.mycompany.division.product.packageb.packaged com.mycompany.division.product.packageb.Class1 com.mycompany.division.product.packageb.Class2 com.mycompany.division.product.packageb.Class3 If you the reduced tree and expand so I can see all the packages I would have to expand packageb which would mean I also see the Classes in navigation. If I did not want to see those classes I would also not see the packagec or packaged. So, in this case, just to have it clarified, when collapsed I would want to see: ...product.packagea ...product.packageb ...product.packageb.packagec ...product.packageb.packaged
FYI: See also https://netbeans.org/bugzilla/show_bug.cgi?id=201404#c2 (-J-Dorg.netbeans.spi.java.project.support.ui.packageView.TRUNCATE_PACKAGE_NAMES=true)