Bug 10599 - Better Java package name display
Summary: Better Java package name display
Status: RESOLVED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P4 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Dani Megert CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2002-03-01 12:45 EST by David Corbin CLA
Modified: 2002-07-02 10:54 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Corbin CLA 2002-03-01 12:45:52 EST
The Java Packages view frequently shows a lot of redundant information. 
Although there is at least one attempt to improve this underway, I'm not happy
with the approach.

What I'd really like is a project property that says "show x for packages that
start with y".  I could say "show '' for packages that start with
'org.apache.struts'", and I would see ".action", ".taglib", (and hypotheticaly
".foo.action").

But, you would never have the problem where foo.fred.bar and foo.stan.bar are
displayed the same.
Comment 1 Dani Megert CLA 2002-03-11 04:37:22 EST
I assume with "...improve this underway..." you mean the possibility to map
package name fragments to some pattern. Correct?

Did you try out patterns like "1." (or any other number instead of 1)? This
would shorten the redundant information and still allow to distinguish
foo.fred.bar (f.f.bar) from foo.stan.bar (f.s.bar)

Am I right that you suggest a list with user defined mappings e.g.
"org.apache.struts" ==> ""
"org.ecplise.jdt." ==> "eclipse_jdt"
...

Why would you like to see it as a per-project property and not a global one?
There will be no collision since packages are grouped in projects and I think
have "A->B" in project1 and "A->C" in project2 would be confusing.
Comment 2 David Corbin CLA 2002-03-11 06:14:01 EST
"underway".  I know there is a field that is settable.  I think someone said on
the newsgroup that it was not yet finished.  Perhaps my information is wrong.

I was unaware that a "pattern" could go there, and I would have never guessed at
the form of "1." for the regular expression ".",or ".{1}".

If you provide a space for a number of listings, then per-project *might* not be
necessary.  I'd have to try to get a good feel for it.  The reason I suggested
per-project, is that *most* projects have a common package prefix, but that
varies by project.  In the case of eclipse projects, it usually is the project
name and appears one-node up on the tree.

I'll give you my "real" world example:
I've got "com.imperitek.project1" as a prefix on a set of 300 classes in about
30  packages I've got. Then, suddenly we have to integrate with another project
in uor company, and we add 15 there packages as "com.imperitek.ext1", and 8 or
so as "IPTK" (I'm going to shoot the guy that came up with that one :) .  I want
to use a per-project prefix of "com.imperitek.project1", because that's the area
*I* work in.  (good point here - really, I want a per-project-per user setting -
don't know if eclipse has that)

Having said all that, and then re-read your comment, I think the reason I asked
for "per-project", is because I was assuming I was specifying a single
substitution, not a list of them.  
Comment 3 Dani Megert CLA 2002-03-11 10:33:11 EST
>I was unaware that a "pattern" could go there, and I would have never guessed at
>the form of "1." for the regular expression ".",or ".{1}".
There is a hover help which explains this and it will make it into the doc. The
feature is still in the "Work in progress" category but additional changes will
only come if time permits it. Help on this is welcome. If you'd like to see this
feature in 2.0 and have time please implement the list based mapping and send us
the code.

>*I* work in.  (good point here - really, I want a per-project-per user setting -
>don't know if eclipse has that)
Currently there's no concept of a user in Eclipse (except for VCM operations)
and hence no user based settings. All *your* settings are kept in your workspace.

I guess if we would add a single mapping per project some people would soon ask
for a list. Therefore I would prefer having a global list with mappings. This
would also be more consistent with other JDT settings (e.g. "Organize Imports")
which are workspace scoped and not per project.
Comment 4 Dani Megert CLA 2002-03-26 10:11:12 EST
Changed summary
Comment 5 Dani Megert CLA 2002-05-29 12:22:29 EDT
Nothing planned for 2.0
Comment 6 Dani Megert CLA 2002-07-02 07:01:56 EDT
Post 2.0 review: the comment for the pattern has been improved and no other
problems were reported against this feature so far. No further work planned.
Closing.
Comment 7 Dani Megert CLA 2002-07-02 10:53:35 EDT
reopning to get rid of LATER flag.
Comment 8 Dani Megert CLA 2002-07-02 10:54:09 EDT
No further work planned.