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 98052 - [65cat] Package Viewer need to show packages smarter
Summary: [65cat] Package Viewer need to show packages smarter
Status: RESOLVED DUPLICATE of bug 53192
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker with 9 votes (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-16 02:07 UTC by tetsu
Modified: 2011-10-13 14:23 UTC (History)
4 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
snapshot of one my project's source roots (20.09 KB, image/png)
2009-09-28 15:30 UTC, twolf2919
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tetsu 2007-03-16 02:07:42 UTC
I don't think the Project View in NB is very good.
If you choose to show java package as tree, NB always show very packages,
even the common parts.
It makes the expending action very hard, you have to click one by one.
For example,
-com
  |
  +--company
       |
       +--example1
       |    |
       |    +-- some java files
       |
       +--example2
            |
            +--some java files.

I think Project Viewer can merge the common packages as list and  packages
containing java files as tree.
ex.
-com.company
     |
     +--exmple1
     |
     |
     +--exmple2
Comment 1 Michel Graciano 2009-09-28 14:31:19 UTC
Well, we had two ways to see packages today, as list and as tree. Basically what you shown in your example, this is how 
tree mode is shown. So, I understand this enhancement is just about tree or should an new mode created, named i.e. flatted tree or something like that?
Comment 2 psartini 2009-09-28 15:20:12 UTC
For me, it is an enhancement to tree mode. But it might be easier to just add another view-mode.
Since the standard package view is what's called flatted in IDEA, what do you think about "Compact Tree View".
It's really nothing more than compacting the empty middle packages.

Comment 3 twolf2919 2009-09-28 15:29:21 UTC
@hmichel,
I can't speak for tetsu, but I would definitely appreciate an enhancement to the tree view which "condensed" the parts
of the tree which have no leaf nodes.  I'm attaching a screen shot of part of my actual project.  As you can see from
it, I'm 6 levels down in the tree before there is actual source code and I'm wasting a lot of horizontal space just to
show the tree structure.  The "list" view looks close to what I want in this source root, but since for all my other
source roots tree view is much better, I need to either be able to set tree vs. list on each source root OR have some
"hybrid" view as tetsu suggests.

Tree view is best for deeply nested, sparse project trees.
List view is best for shallow but dense project trees.

Larger projects can be both: our project currently has 3850 java files, split over 4 separate source roots and around
398 packages.  Clearly, I don't want to see 398 lines of package names.  At the same time, I don't want to have to
allocate a very wide navigation window to avoid having to scroll horizontally over empty tree nodes.

This issue may be "only" 2 years old, but I'm sure that people have suggested something similar for much longer (4.0
days or even in 3.x?)

Comment 4 twolf2919 2009-09-28 15:30:29 UTC
Created attachment 88435 [details]
snapshot of one my project's source roots
Comment 5 Michel Graciano 2009-09-28 15:39:47 UTC
I CCed Jiri in this issue because I really wish to hear if someone from IDE team could add some concern about it even 
any tip would be appreciated. I have no much time to implement it for now, but I will try to take a look asap since I 
personally would like to see it implemented in the future.

@psartini
BTW, I think the best way is to add a new mode and make the current behaviour as it is today and the name, I really 
liked your suggestion. In Eclipse the name of this feature is 'flat'.

@twolf
Yes, the idea is have something similar to tetsu proposal. I just know the eclipse implementation and is really similar 
to this. IMHO now is time to define how we want this feature implemented and I can try to implement it as soon as I can 
or maybe someone else could do this too. I have no idea how this is implemented in nb source tree yet as well where I 
could develop this even if there is a way to implement this by an plugin an get it for current ide versions. SO, I 
appreciate your comment and I hope to get some time to this soon. :)

Regards
Comment 6 psartini 2009-10-18 19:42:46 UTC
@hmichel
I am not that deep into the NetBeans Platform yet, but I need to dive into it more deep at the end of the year. From what 
I already know, this compact tree feature should not be that hard to implement.

If you don't get to it until I have some free time, I will try my luck. So please keep me updated about your progress ( I 
hate needless work ).
Comment 7 Michel Graciano 2009-10-19 12:48:48 UTC
@psartini
Fell free to implement it and thanks for your help. If you need any help, just let us know. I have several other issues 
to take a look that any help is always welcome.

Regards
Comment 8 Michel Graciano 2009-10-19 13:05:34 UTC
@psartini
Maybe you already heard about NetFIX [1] program. I am pretty sure you could be an new member of our team.

[1] http://wiki.netbeans.org/NetFIX
Comment 9 Jesse Glick 2011-10-13 14:23:03 UTC

*** This bug has been marked as a duplicate of bug 53192 ***