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 123940 - Navigator window open with collapsed node by default
Summary: Navigator window open with collapsed node by default
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Explorer (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jan Lahoda
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2007-12-13 11:46 UTC by Michel Graciano
Modified: 2008-12-22 11:53 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michel Graciano 2007-12-13 11:46:41 UTC
When I call Ctrl+7, the Navigator window open with class node collapsed by default for several times.
Comment 1 David Simonek 2007-12-13 17:03:58 UTC
passing to java/navigation where it belongs...
Comment 2 Michel Graciano 2007-12-20 12:16:07 UTC
It happens just for the first time I use Navigator window after I open the IDE.
Comment 3 Jiri Prox 2008-01-02 10:33:34 UTC
Which build do you use?
Comment 4 Michel Graciano 2008-01-02 18:30:51 UTC
Product Version: NetBeans IDE 6.0 (Build 200711261600)
Java: 1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_03-b05
System: Linux version 2.6.22-14-generic running on i386; UTF-8; pt_BR (nb)
Userdir: /home/michel/.netbeans/6.0
Comment 5 Jiri Prox 2008-01-04 07:56:02 UTC
Thanks, I have it seen with build 20080103125301, but for me it doesn't happen always (of course I've tested it after
opening IDE)
Comment 6 Michel Graciano 2008-01-04 14:19:54 UTC
I think I found the problem.
1-Open the IDE and any java file;
2-Set cursor on class declaration: 'public class...'
3-Restart IDE;
4-Open the Navigator window, and the class will be collapsed.

I am using a docked Navigator window. Should you test and remove RANDOM keyword?

Cheers.
Comment 7 Jiri Prox 2008-01-04 14:57:50 UTC
Yes, that is the testcase, thanks again
Comment 8 Jan Becicka 2008-01-31 10:04:27 UTC
P4 imo
Comment 9 Michel Graciano 2008-01-31 12:39:49 UTC
According to the priority guidelines: "Inconsistent or non-standard access by keyboard (if the component is focusable in
different way as it's defined in guidelines or by IDE conventions)" is a P2.
Comment 10 Jan Lahoda 2008-01-31 13:21:24 UTC
Sorry, but I do not think this qualifies as P2 - the guideline, IMO, does not refer to a node that is collapsed when it
should be expanded (moreover there is a simple workaround - press right arrow to expand).

The cause for this problem seems to be clear: when the navigator is slided, an instance of the navigator view exists,
but is not part of the AWT hierarchy. The navigator view calls BeanTreeView.expandAll, but as the view is not in the
hierarchy, it does nothing (at least for the very first time in the given IDE run). When the navigator is un-slided,
there is noone to call expandAll anymore.

I have fixed/workarounded this in the Java Navigator by overriding the expandAll method and calling it again on
addNotify, but maybe the BeanTreeView should do this automatically. Passing to openide/explorer for consideration.

I have the patch in my outgoing clone, will be part of the main repository after my next push. Id: 92f69edc59e8
Comment 11 Michel Graciano 2008-01-31 13:40:22 UTC
Thanks. I will verify on next daily build.
Comment 12 Jan Lahoda 2008-01-31 20:23:19 UTC
I have pushed my changed, but I am not sure if it was soon enough for today's daily build.
http://hg.netbeans.org/main/rev/92f69edc59e8
Comment 13 Antonin Nebuzelsky 2008-02-07 16:02:16 UTC
Reassigning to new module owner Tomas Holy.
Comment 14 t_h 2008-02-26 10:42:34 UTC
Ok, I will add your fix to TreeView. Should I remove it from ClassMemberPanelUI$MyBeanTreeView or you will do it yourself?
Comment 15 t_h 2008-02-26 15:40:40 UTC
I realized that this workaround would solve only this particular situation. In other situations when tree view is not
visible it would be necessary to track all expand/collapse calls and postpone them. So, I suggest to keep this
change/workaround in ClassMemberPanelUI$MyBeanTreeView and take into account that BeanTreeView does not expand/collapse
while invisible.
Comment 16 Jan Lahoda 2008-02-26 15:48:47 UTC
Not sure why it got reassigned to me - I passed it to openide so that you got a chance to think about it. I do not think
there is any reason to keep the issue open in the current situation.