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.
If the node contains itself in its lookup, takeAction() creates a lookup which contains the node twice.
Sorry about that, bad subcomponent.
Created attachment 20646 [details] Test which proves the defect
Caused by Jirka's fix of issue 51400. It probably needs some filtering (wrap the lookup only if it doesn't already contain the node).
*** Issue 55303 has been marked as a duplicate of this issue. ***
Probably a duplicate of someting else.
Checking in src/org/openide/explorer/view/TreeView.java; /cvs/openide/src/org/openide/explorer/view/TreeView.java,v <-- TreeView.java new revision: 1.184; previous revision: 1.183 done Processing log script arguments... More commits to come... Checking in test/unit/src/org/openide/explorer/view/TreeViewTest.java; /cvs/openide/test/unit/src/org/openide/explorer/view/TreeViewTest.java,v <-- TreeViewTest.java new revision: 1.2; previous revision: 1.1 done
The fix does not work when the node contains itself in the lookup and is filtered by a FilterNode and takeAction() is called for the FilterNode. Reopening.
Created attachment 20652 [details] Test which proves the FilterNode defect
Thanks for fast investigation and very useful tests. The problem, if tests FilterNode, is not in TreeView.takeAction() but a problem in lookup. I have filed new issue 55938. For now TreeView can workaround it, the workaround will removed when issue 55938 will be fixed. Checking in src/org/openide/explorer/view/TreeView.java; /cvs/openide/src/org/openide/explorer/view/TreeView.java,v <-- TreeView.java new revision: 1.185; previous revision: 1.184 done Processing log script arguments... More commits to come... Checking in test/unit/src/org/openide/explorer/view/TreeViewTest.java; /cvs/openide/test/unit/src/org/openide/explorer/view/TreeViewTest.java,v <-- TreeViewTest.java new revision: 1.3; previous revision: 1.2 done
Works fine now. Thanks for the workaround, I can close the issue that originally started all this.
Note: I have removed the workaround when fixing issue 108923 as it was no longer necessary. openide/explorer/src/org/openide/explorer/view/TreeView.java,v1.29