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.
testSingleSelectionMode fail [MODE: SINGLE_TREE_SELECTION][NODES: two nodes contiguous] PropertyVetoException was NOT thrown. testContigousSelection fail [MODE: CONTIGUOUS_TREE_SELECTION][NODES: two nodes discontiguous] PropertyVetoException was NOT thrown.
Created attachment 14409 [details] The failures
Maybe a thread problem if selection is preplanned to AWT thread, will be investigate.
Assigned to new owner.
After long debugging, I can only conclude that the problem is in the interaction of the test and windows system. The TreeView's addNotify is not called, although the test does call ExplorerPanel.open() on an EP containing TreeView. TreeView needs to get addNotify() to work correctly (to be able to lookup its EM). It has to do something with new WS, and the following exception is logged during the test: java.lang.IllegalStateException: Creating default editor mode. It shouldn't happen this way org.netbeans.core.windows.WindowManagerImpl.getDefaultEditorMode(WindowManagerImpl.java:482) org.netbeans.core.windows.WindowManagerImpl.topComponentOpen(WindowManagerImpl.java:939) org.openide.windows.TopComponent.open(TopComponent.java:276) org.openide.explorer.ExplorerPanel.open(ExplorerPanel.java:172) Note: The code does correctly veto the selection change if set so. It does no replanning, so Jirka's idea is wrong.
*** Issue 38110 has been marked as a duplicate of this issue. ***
cvs -q ci -m "#42007: The test was failing due to interaction with core/windows. I've disabled the lookup, so default impl of WindowSystem is used and everything seems to work" Checking in unit/src/org/openide/explorer/view/SelectionModeTest.java; /cvs/openide/test/unit/src/org/openide/explorer/view/SelectionModeTest.java,v <-- SelectionModeTest.java new revision: 1.9
Great, it works OK now. Thanks, Yarda.