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 55826 - The context lookup created by TreeView.takeAction() sometimes contains the node twice
Summary: The context lookup created by TreeView.takeAction() sometimes contains the no...
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Explorer (show other bugs)
Version: 4.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: Jiri Rechtacek
URL:
Keywords:
: 55303 (view as bug list)
Depends on: 55938
Blocks: 55750
  Show dependency tree
 
Reported: 2005-03-03 09:34 UTC by Andrei Badea
Modified: 2008-12-22 10:57 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Test which proves the defect (4.02 KB, patch)
2005-03-03 09:53 UTC, Andrei Badea
Details | Diff
Test which proves the FilterNode defect (1.51 KB, patch)
2005-03-03 14:08 UTC, Andrei Badea
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrei Badea 2005-03-03 09:34:56 UTC
If the node contains itself in its lookup,
takeAction() creates a lookup which contains the
node twice.
Comment 1 Andrei Badea 2005-03-03 09:51:13 UTC
Sorry about that, bad subcomponent.
Comment 2 Andrei Badea 2005-03-03 09:53:08 UTC
Created attachment 20646 [details]
Test which proves the defect
Comment 3 Petr Nejedly 2005-03-03 10:07:45 UTC
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).
Comment 4 Stanislav Aubrecht 2005-03-03 10:36:41 UTC
*** Issue 55303 has been marked as a duplicate of this issue. ***
Comment 5 Petr Hrebejk 2005-03-03 10:41:13 UTC
Probably a duplicate of someting else.
Comment 6 Jiri Rechtacek 2005-03-03 10:46:01 UTC
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
Comment 7 Andrei Badea 2005-03-03 14:07:35 UTC
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.
Comment 8 Andrei Badea 2005-03-03 14:08:13 UTC
Created attachment 20652 [details]
Test which proves the FilterNode defect
Comment 9 Jiri Rechtacek 2005-03-04 08:48:59 UTC
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
Comment 10 Andrei Badea 2005-03-04 09:28:39 UTC
Works fine now. Thanks for the workaround, I can close the issue that
originally started all this.
Comment 11 Petr Nejedly 2007-10-18 16:50:07 UTC
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