Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 24612

Summary: cut number of root packages from package names from package explorer
Product: [Eclipse Project] JDT Reporter: Robert Varga <robvarga>
Component: UIAssignee: Dani Megert <daniel_megert>
Status: RESOLVED WORKSFORME QA Contact:
Severity: enhancement    
Priority: P3    
Version: 2.0.2   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Robert Varga CLA 2002-10-10 04:44:04 EDT
A useful package name compression feature would be to cut a user-settable 
number of parts from the beginning of the fully-specified package name in the
package explorer, if the full package name is longer than the specified number 
of parts to be cut. The cutting would be indicated with a dot (.) at the 
beginning of the shown version of the package name.

Eg. with a number of two, a package name of 'com.mycompany.project.test' would 
result in displaying something like '.project.test' ( to show that the full 
number of parts were cut). 

In case of the full package name is less than or equal to the number of parts 
to cut, it would show the original package name, eg. with a setting of 4, 
'com.company.project.test' would be displayed as 'com.company.project.test', 
'com.company.something' would be 'com.company.something', 
but 'com.company.project.something.ui.test' would be only '.ui.test'.

It would be most useful if this number could be set on a per-folder or at least 
per-project basis, but even if it would be a single setting for the whole Java 
Perspective, it would still be useful.

Regards,

Robert Varga
Comment 1 Adam Kiezun CLA 2002-10-10 05:00:21 EDT
asking Dani for comments
Comment 2 Dani Megert CLA 2002-10-10 05:15:44 EDT
Varga,
there is already a very similar feature for this. Did you try this out?
Java -> Appearance -> Compress package name segments

Additionally there's a PR which asks for setting the depth (22208)

I don't thinkg that (only) a cut-off value for segments is useful. The problem
is the lenght of the full package name. if I have two segments each 20 chars I
would like this to be shortend as well as I like a package name made out of 5
shorter segments to be made smaller.

>It would be most useful if this number could be set on a per-folder or at least 
>per-project basis, but even if it would be a single setting for the whole Java 
>Perspective, it would still be useful.
Currently all appearance settings are per workspace.