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 201404

Summary: Define abbreviations for packages names
Product: java Reporter: gualtiero65
Component: ProjectAssignee: Tomas Zezula <tzezula>
Status: RESOLVED DUPLICATE    
Severity: normal CC: athompson, mmirilovic
Priority: P2 Keywords: UI
Version: 7.0.1   
Hardware: All   
OS: All   
URL: http://java.dzone.com/articles/eclipse-tip-help-tidy-package
Issue Type: ENHANCEMENT Exception Reporter:

Description gualtiero65 2011-08-29 16:41:32 UTC
Hi,

it would be nice to have in NB the following Eclipse feature: the possibility to define abbreviations for the package names to be used by the UI (f.e. in the explorer windows).

For better explanation see at http://java.dzone.com/articles/eclipse-tip-help-tidy-package.

This will improve source files identification in the project explorer.

It can also help to identify misspelled packages names if you work with several modules/packages.

Gualtiero
Comment 1 Marian Mirilovic 2011-09-05 11:25:39 UTC
*** Bug 201442 has been marked as a duplicate of this bug. ***
Comment 2 Jesse Glick 2011-09-06 19:43:39 UTC
-J-Dorg.netbeans.spi.java.project.support.ui.packageView.TRUNCATE_PACKAGE_NAMES=true already does something like this, but there is no UI to turn this mode on (you need to edit netbeans.conf).

*** This bug has been marked as a duplicate of bug 53192 ***
Comment 3 gualtiero65 2011-09-07 06:37:48 UTC
Hi,

I do not fully agree about the decision do close this Enhancement Request.

With the -J-Dorg.netbeans.spi.java.project.support.ui.packageView.TRUNCATE_PACKAGE_NAMES=true option you cannot control which packages you want to shorten and how.

Eclipse give the possibility to select the part of the package names you want to shorten.

For example, in the project I'm currently working on, I have all packages below com.geasoftware.safetymac.

With the TRUNCATE_PACKAGE_NAMES=true option I have all packages in the Explorer window starting with

   c.gea.saf.......

while with a Eclipse-like solution I could specify

   SM = com.geasoftware.safetymac

to have all packages shown as 

   $SM......

Much more readable!

Moreover if I make an error in the package name (like com.gesoftware.safetymac)  (i.e. missing a letter), with the TRUNCATE_PACKAGE_NAMES=true I could not catch it immediately while with the Eclipse-like solution I would get an unshortened package.

Gualtiero
Comment 4 athompson 2011-09-07 20:43:22 UTC
(In reply to comment #3)
I agree.  I left a note on the original bug pitching this solution as well.