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 56468 - [60cat] View do not remember collapsed/expanded state of nodes
Summary: [60cat] View do not remember collapsed/expanded state of nodes
Status: NEW
Alias: None
Product: debugger
Classification: Unclassified
Component: Code (show other bugs)
Version: 4.x
Hardware: All Windows XP
: P3 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks: 58056 233809
  Show dependency tree
 
Reported: 2005-03-15 15:21 UTC by _ lcincura
Modified: 2013-08-06 10:22 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
UI gestures preceding an occurrence of this issue (18.28 KB, text/plain)
2007-10-16 20:19 UTC, gholmer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ lcincura 2005-03-15 15:21:24 UTC
NetBeans IDE 4.1 [200503141900] on jdk 1.5.0_02

The views do not remember state of its nodes. When user expands some nodes,
switches to another view and back to original view, only toplevel nodes are
shown. This happens also when view are used as sliding windows, everytime the
vies is hidden and then displayed, the nodes are all collapsed.
 This is serious usability bug, which must be fixed before release. For more
info abut the bug severity, please see issue 42210.
Comment 1 Maros Sandor 2005-03-23 14:48:02 UTC
I browsed daily builds of netbeans and this issue seems to popup between 01/06
and 01/09 builds. It was most probably caused by fixing the Issue #46614. 
From what I saw ... the problem here is that debugger computes nodes and node
values (e.g. LocalVariables) on demand and asynchronously. This causes the fact
that tree tables that wish to expand nodes that were previously expanded fail to
find these previously expanded nodes just because those nodes are not yet
available ... are being computed in some other thread. Even if it waits for
those nodes to appear, there is another problem. Values of those nodes are
computed asynchronously too, so asking the node for its name may return null and
after 100ms may return "name" correctly. This seems to me to be very hard to fix
in the current model. I will leave it to Jan to come with a reasonable solution,
he knows this mode of operation better. I also noticed that TreeModelNode
constructor fires a thread to compute its fields. This not only leaves nodes
partially constructed but also poses the threat that "this" may easily escape
the constructor ... which it escapes anyway in
treeModelRoot.registerNode(object, this).
Comment 2 Martin Entlicher 2005-07-21 14:23:11 UTC
This should be already fixed in 4.2 builds. Please verify...
Comment 3 _ lcincura 2005-07-21 15:07:52 UTC
It is still reproducible in NetBeans IDE 4.2 build 200507191800 on jdk 1.5.0_04.
Comment 4 Martin Entlicher 2005-10-07 13:00:48 UTC
True.
The expanded/collapsed state is kept during stepping and other debugger actions.
But not when the views are switched.
Comment 5 Martin Entlicher 2006-10-24 16:39:16 UTC
See issue #79951, it's going to be fixed into NB 6.0.
Comment 6 Martin Entlicher 2006-10-27 13:59:13 UTC
This is fixed by the fix of issue #79951:

/cvs/debuggercore/api/src/org/netbeans/api/debugger/Breakpoint.java,v  <-- 
Breakpoint.java
new revision: 1.6; previous revision: 1.5

/cvs/debuggerjpda/ui/src/org/netbeans/modules/debugger/jpda/ui/views/ClassesView.java,v
 <--  ClassesView.java
new revision: 1.11; previous revision: 1.10

/cvs/debuggerjpda/ui/src/org/netbeans/modules/debugger/jpda/ui/views/SourcesView.java,v
 <--  SourcesView.java
new revision: 1.11; previous revision: 1.10

/cvs/debuggerjpda/ui/src/org/netbeans/modules/debugger/jpda/ui/views/ViewModelListener.java,v
 <--  ViewModelListener.java
new revision: 1.12; previous revision: 1.11

/cvs/debuggerjpda/ui/src/org/netbeans/modules/debugger/jpda/ui/Evaluator.java,v
 <--  Evaluator.java
new revision: 1.12; previous revision: 1.11

/cvs/debuggercore/viewmodel/src/org/netbeans/spi/viewmodel/Models.java,v  <-- 
Models.java
new revision: 1.28; previous revision: 1.27

/cvs/debuggercore/viewmodel/src/org/netbeans/modules/viewmodel/TreeTable.java,v
 <--  TreeTable.java
new revision: 1.26; previous revision: 1.25

/cvs/debuggercore/src/org/netbeans/modules/debugger/ui/views/View.java,v  <-- 
View.java
new revision: 1.5; previous revision: 1.4

/cvs/debuggercore/src/org/netbeans/modules/debugger/ui/views/ViewModelListener.java,v
 <--  ViewModelListener.java
new revision: 1.14; previous revision: 1.13
Comment 7 ehucka 2007-02-21 13:39:46 UTC
I tried a similar scenario like in issue 79951 - switching between Sessions view
and Local Variables view. Some variables were expanded in Local Variables view
but after switch back from Sessions view the variables were collapsed.
I reproduced it with debuggercore/test/qa-functional/data/debugTestProject project.
Comment 8 Martin Entlicher 2007-10-02 16:49:40 UTC
Well, collapsed/expanded state of nodes seems to be remembered correctly now. I can switch berween all views back and
forth and all expansions seems to be remembered just fine.
Please verify or describe the particular case which does not work.
Might be already fixed by other changes. Resolving as fixed.
Comment 9 gholmer 2007-10-10 14:17:00 UTC
I am still seeing this issue with recent builds of 6.0 (early October).  The symptom is that I am inspecting a complex
object, descending into child nodes, when suddenly the node collapses ("un-expands").

The problem is intermittent and I do not have a repro case for it.  I am wondering whether it has to do with remote
debugging, but that's only a wild guess.

See this thread on the NetCAT list for more information:

http://www.netbeans.org/servlets/ReadMsg?list=netcat&msgNo=9164
Comment 10 gholmer 2007-10-16 20:19:38 UTC
Created attachment 51058 [details]
UI gestures preceding an occurrence of this issue
Comment 11 _ gordonp 2008-03-26 18:26:34 UTC
I've had very similar problems with the gdb debugger module...
Comment 12 Martin Entlicher 2008-10-10 14:23:02 UTC
Might be fixed by the new Outline view which we plan to start using in the next NetBeans version.
Not yet fixed due to problematic reproducibility.
Comment 13 Daniel Prusa 2009-05-13 15:49:40 UTC
Reproducible for collections (may be, for variables processed by formatters?):

steps to reproduce
- have an instance of (e.g.) ArrayList containing String values
- in Variables view, expand the list and also expand some of the contained strings
- switch to another view and back -> the list is still expanded but the strings are collapsed
Comment 14 Martin Entlicher 2012-06-15 09:23:29 UTC
It looks like this could be caused by lazy children loading.
When a node sets a "Please wait" node as it's children, it stops with auto expansion, because it does not find the children nodes it looks for.