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.
In UI automated tests it is a problem to find popup window and JTable in it when "down" button in editor mode is pressed. It is caused by changes in org.netbeans.swing.tabcontrol package. Previously popup was constructed in org.netbeans.swing.tabcontrol.plaf.TabListPopup (line 435, release40). Now it is constructed in org.netbeans.swing.tabcontrol.ButtonPopupSwitcher (line 106) but it has no parent. It should be fixed. KeyboardSwitcher might be a similar case. To run affected tests: cd nb_all/jellytools/test ant -Dxtest.run.singletest=org/netbeans/jellytools/EditorWindowOperatorTest.class
I hope it's fixed. But not sure if this was the reason why test failed. Test on my machine is still failing but I hope the reason is that I'm running them wrong. Pls, try it yourself Jirko (since you know much more about jelly then me) and let me know how is the result. I tried my simple tests and JTable you talked about has parent and I think the current code for ButtonSwitcher is OK. I haven't found any differencies between previous popup and current (after this patch). Thanks for the help and reopen if you still think the problem is with ButtonPopupSwitcher. Checking in core/swing/tabcontrol/src/org/netbeans/swing/tabcontrol/ButtonPopupSwitcher.java; /cvs/core/swing/tabcontrol/src/org/netbeans/swing/tabcontrol/ButtonPopupSwitcher.java,v <-- ButtonPopupSwitcher.java new revision: 1.4; previous revision: 1.3 done
It is better but not completely fixed. The problem is that in method ButtonPopupSwitcher.doSelect is called EventQueue.getCurrentEvent() and source is used as upcoming parent. But that event doesn't need to be the action event. In my case it is HierarchyEvent[HIERARCHY_CHANGED] and then parent is set incorrectly. IMHO, you need to pass parent component from TabListPopupAction.actionPerformed to ButtonPopupSwitcher.doSelect as parameter. I tested the patch I will include and it worked.
Created attachment 19156 [details] ButtonPopupSwitcher patch
Created attachment 19157 [details] TabListPopupAction patch
Ok, I didn't count with such a case. Thanks for your time. The patch was applied. Checking in core/swing/tabcontrol/src/org/netbeans/swing/tabcontrol/ButtonPopupSwitcher.java; Checking in core/swing/tabcontrol/src/org/netbeans/swing/tabcontrol/TabListPopupAction.java; Checking in core/swing/tabcontrol/test/unit/src/org/netbeans/swing/tabcontrol/ButtonPopupSwitcherTestHid.java;
Thanks. Verified in build 20041206-1914.