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.
This is in reference to Issue #13348. I still don't think this is implemented completely correctly. The 1.113 rev of TreeView.java is supposed to solve problems with "fake deletions", where a node goes missing but there was already a different selection. In dev sources, open Options dialog. Expand Modules node and under Data Files, select Resource Bundles. Change Enabled to False. When done, Resource Bundles is still selected, as expected. Turn the module back on. Now expand Templates -> Other, so that Properties File is visible. Select Resource Bundles module again, and again turn it off. This time, the HTML File template gets selected. Now try the same with my special module that displays Options in the Runtime tab (which I will attach). This time it works. So I suspect the problem is in TreeTableView's interpretation of the deletion event - BeanTreeView seems to be OK.
Created attachment 8329 [details] Mini-module (JAR) which displays Options in Runtime tab
This seems to fix this problem (at least it seems to for me!). However, I didn't dig into the TreeTable code well enough to understand it completely... Index: openide/src/org/openide/explorer/view/TreeTable.java =================================================================== RCS file: /cvs/openide/src/org/openide/explorer/view/TreeTable.java,v retrieving revision 1.20 diff -u -r1.20 TreeTable.java --- openide/src/org/openide/explorer/view/TreeTable.java 3 Dec 2002 14:11:40 -0000 1.20 +++ openide/src/org/openide/explorer/view/TreeTable.java 28 Dec 2002 23:47:18 -0000 @@ -423,7 +423,10 @@ protected TreeModelListener createTreeModelListener() { return new JTree.TreeModelHandler() { public void treeNodesRemoved(TreeModelEvent e) { - tree.setSelectionPath (TreeView.findSiblingTreePath (e.getTreePath (), e.getChildIndices ())); + if (tree.getSelectionCount () == 0) { + tree.setSelectionPath (TreeView.findSiblingTreePath (e.getTreePath (), e.getChildIndices ())); + tree.requestFocus(); + } } }; }
Version changed: 4.0 dev -> S1S 4.2
thanks John for patch. the same way was used in TreeView. I guess too that this patch fixed this problem.
verified [0309030100]