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 you set the unit test window to be a floating window, then after test finished it will pop up, *but* doesn't have a focus. So you have to e.g. click it with a mouse and then press ESC. Or press Ctrl+4 (output will apear) followed by ESC. Anyway it will hide the editor and you don't see what you typing, and so on... Seem to be a minor problem but since a lot of (not only) NB developers runs their test very often it became very annoying to do this after every single test run (Shift+F6). Moreover I believe this is a simple fix. So P2 to make sure it is going to be fixed soon and for 5.0.
Seems that it is happening only when tests passed succesfully. When test failed the floating windows gets focus correctly. So probably even easier fix.
I confirm the window does not get focus. Accepted. I do not confirm the behaviour depends on whether the tests passed or failed.
This is caused by the current implementation of the JUnit results window. It changes its content using sequence removeAll(); add(...); The removeAll() call causes that there is no focusable component present for a moment. During this moment, none of the TopComponent's components can receive focus so the keyboard focus stays in the previous TopComponent.
Fixed in the trunk. Now the panels for displaying results are reused, removeAll() is never called. Modified files: junit/src/org/netbeans/modules/junit/output/: ResultPanelTree.java (1.2) Manager.java (1.4) ResultWindow.java (1.6) ResultPanelOutput.java (1.2) JUnitOutputReader.java (1.8) MultiviewPanel.java (1.5) ResultTreeView.java (1.5) Bundle.properties (1.8) ReportNode.java (1.3) ResultView.java (1.11) Diffs: http://junit.netbeans.org/source/browse/junit/src/org/netbeans/modules/junit/output/ResultPanelTree.java?r1=1.1&r2=1.2&diff_format=u http://junit.netbeans.org/source/browse/junit/src/org/netbeans/modules/junit/output/Manager.java?r1=1.3&r2=1.4&diff_format=u http://junit.netbeans.org/source/browse/junit/src/org/netbeans/modules/junit/output/ResultWindow.java?r1=1.5&r2=1.6&diff_format=u http://junit.netbeans.org/source/browse/junit/src/org/netbeans/modules/junit/output/ResultPanelOutput.java?r1=1.1&r2=1.2&diff_format=u http://junit.netbeans.org/source/browse/junit/src/org/netbeans/modules/junit/output/JUnitOutputReader.java?r1=1.7&r2=1.8&diff_format=u http://junit.netbeans.org/source/browse/junit/src/org/netbeans/modules/junit/output/MultiviewPanel.java?r1=1.4&r2=1.5&diff_format=u http://junit.netbeans.org/source/browse/junit/src/org/netbeans/modules/junit/output/ResultTreeView.java?r1=1.4&r2=1.5&diff_format=u http://junit.netbeans.org/source/browse/junit/src/org/netbeans/modules/junit/output/Bundle.properties?r1=1.7&r2=1.8&diff_format=u http://junit.netbeans.org/source/browse/junit/src/org/netbeans/modules/junit/output/ReportNode.java?r1=1.2&r2=1.3&diff_format=u http://junit.netbeans.org/source/browse/junit/src/org/netbeans/modules/junit/output/ResultView.java?r1=1.10&r2=1.11&diff_format=u
Cool, this will save me few finger-aches ;) Just tested. Seems to work. Thanks.