Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 29855 - [TTV] expands nodes when it shouldn't
[TTV] expands nodes when it shouldn't
Status: RESOLVED WORKSFORME
Product: platform
Classification: Unclassified
Component: Outline&TreeTable
3.x
All All
: P3 (vote)
: 6.x
Assigned To: Stanislav Aubrecht
issues@platform
:
: 29724 (view as bug list)
Depends on:
Blocks: 33281
  Show dependency treegraph
 
Reported: 2003-01-08 04:03 UTC by Torbjorn Norbye
Modified: 2008-12-22 20:37 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Torbjorn Norbye 2003-01-08 04:03:37 UTC
I had this problem in the tasklist module that
collapsed node trees would sometimes reexpand when
other parts of the node tree were updated. This
makes it really hard to use - you want to look at
a later part in the tree, but the top part (which
you had collapsed) keeps expanding and hiding

I've tracked it down and believe the problem is in
TreeTable.java, specifically 
org.openide.explorer.view.TreeTable$1.treeNodesRemoved(TreeTable.java:426)


        protected TreeModelListener
createTreeModelListener() {
            return new JTree.TreeModelHandler() {
                public void
treeNodesRemoved(TreeModelEvent e) {
                    tree.setSelectionPath
(TreeView.findSiblingTreePath (e.getTreePath (),
e.getChildIndices ()));
                }
            };
        }

Note that the above code is called for ALL deleted
nodes that are visible - not when the selected
node is deleted.

Note also that setSelectionPath is documented to
expand nodes as necessary.

So, after doing some document deletions,
findSibling goes into a neighbor tree and expands it.


I think the above code is an attempt to select the
"next" element when the node that is selected is
deleted - but that doesn't currently happen - so
the above code doesn't achieve that.

What it -does- however achieve is to expand
collapsed nodes, something the user does not want.

I commented out this code, and things work much
better in the tasklist module.

Are there any scenarios in netbeans the above is
serving - if so, what are they?  If not, can I
request that the above is removed?
Comment 1 Jiri Rechtacek 2003-01-09 17:33:17 UTC
Tor, I fixed the issue 29551 in TreeTable. The issue also describes
bad behavior of a tree after node deletion. I think it might be same
problem as in this issue. Could you try if the fix solves it? Thanks
Comment 2 Torbjorn Norbye 2003-01-20 16:55:21 UTC
I think I'm still seeing an issue (because I'm typically replacing the
entire node tree when this is occurring).  Let me double check that
and get back to you.
Comment 3 Jiri Rechtacek 2003-02-19 17:22:29 UTC
Is it heavy asked for 3.5 or could be solve later?
Comment 4 Stanislav Aubrecht 2005-10-04 10:17:53 UTC
tor, any update on reproducibility of this issue? (it's pretty old one:)
Comment 5 Stanislav Aubrecht 2005-10-04 10:32:12 UTC
*** Issue 29724 has been marked as a duplicate of this issue. ***
Comment 6 Stanislav Aubrecht 2006-08-03 11:55:52 UTC
works for me - pls reopen this issue if you can still reproduce it


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo