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.
As has been discussed on dev@openide: http://openide.netbeans.org/servlets/ReadMsg?msgId=636478&listName=dev the default way of using ExplorerUtils leaves TopComponent.getLookup() and TopComponent.getActivatedNodes() in inconsistent state. I'am attaching a solution that fixes this state by adding one new TopComponent constructor with Lookup as argument. If used, the TopComponent then automatically synchronizes lookup content with its getActivatedNodes values.
Created attachment 12614 [details] Improvements to code and test base
Silence == Agreement. Will be commited soon.
Checking in openide-spec-vers.properties; /cvs/openide/openide-spec-vers.properties,v <-- openide-spec-vers.properties new revision: 1.127; previous revision: 1.126 done Processing log script arguments... More commits to come... Checking in api/doc/changes/apichanges.xml; /cvs/openide/api/doc/changes/apichanges.xml,v <-- apichanges.xml new revision: 1.180; previous revision: 1.179 done Processing log script arguments... More commits to come... Checking in src/org/openide/explorer/ExplorerUtils.java; /cvs/openide/src/org/openide/explorer/ExplorerUtils.java,v <-- ExplorerUtils.java new revision: 1.3; previous revision: 1.2 done Processing log script arguments... More commits to come... Checking in src/org/openide/windows/TopComponent.java; /cvs/openide/src/org/openide/windows/TopComponent.java,v <-- TopComponent.java new revision: 1.109; previous revision: 1.108 done Processing log script arguments... More commits to come... Checking in test/unit/src/org/openide/explorer/ExplorerUtilCreateLookupTest.java; /cvs/openide/test/unit/src/org/openide/explorer/ExplorerUtilCreateLookupTest.java,v <-- ExplorerUtilCreateLookupTest.java new revision: 1.2; previous revision: 1.1 done Processing log script arguments... More commits to come... RCS file: /cvs/openide/test/unit/src/org/openide/windows/TopComponentLookupToNodesBridge.java,v done Checking in test/unit/src/org/openide/windows/TopComponentLookupToNodesBridge.java; /cvs/openide/test/unit/src/org/openide/windows/TopComponentLookupToNodesBridge.java,v <-- TopComponentLookupToNodesBridge.java initial revision: 1.1
closed