| Summary: | [render] Hide prefix of package names in package explorer | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Markus Gaisbauer <markus.gaisbauer> |
| Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | deepakazad, martinae, remy.suen |
| Version: | 3.4 | Keywords: | helpwanted |
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Markus Gaisbauer
There is actually a similar functionality in JDT that might meet your needs. 1. Window > Preferences > Java > Appearance 2. Configure 'Compress all package name segments, except the final segment'. Thanks. I know about the "Compress all package name segments, except the final segment" feature. However, if I am not mistaken, I can't use this to express something like the proposed feature.
Maybe we could even use normal regular expressions instead of those compression patterns:
Original: "org.eclipse.jdt"
Abbreviated: "..jdt"
Compression pattern: "."
Regexp: "/[^.]+\././"
Abbreviated: "jdt"
Compression pattern: "0"
Regexp: "/[^.]+\.//"
Abbreviated: "org~.ecl~.jdt"
Compression pattern: "3~"
Regexp: "/([^.]{3})[^.]*\./$1~./"
Abbreviated: "eclipse.jdt"
Compression pattern: ?
Regexp: "/^org.//"
This is not an area with priority to us. Help in the form of a simple patch would be most welcome. (In reply to comment #0) > I propose to add an option to completely hide a prefix. > > Example > =============================================== > Prefix: "com.company.product" > > Original: "com.company.product" > Abbreviated: "." > > Original: "com.company.product.componentA" > Abbreviated: "componentA" > > Original: "com.company.product.componentA.packageA" > Abbreviated: "componentA.packageA" This can be done now with the new 'Abbreviate Package names' feature with a rule like "com.company.product=" (note that the right hand side is blank) |