Bug 64305 - Not able to hide JUnit window with keyboard
Not able to hide JUnit window with keyboard
Status: CLOSED FIXED
Product: java
Classification: Unclassified
Component: JUnit
5.x
All All
: P2 (vote)
: 5.x
Assigned To: Marian Petras
junit-issues@java
: A11Y, FOCUS
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-09-14 09:17 UTC by Martin Krauskopf
Modified: 2005-10-19 11:16 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Krauskopf 2005-09-14 09:17:27 UTC
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.
Comment 1 Martin Krauskopf 2005-09-14 09:24:53 UTC
Seems that it is happening only when tests passed succesfully. When test failed
the floating windows gets focus correctly. So probably even easier fix.
Comment 2 Marian Petras 2005-09-15 15:27:35 UTC
I confirm the window does not get focus. Accepted.

I do not confirm the behaviour depends on whether the tests passed or failed.
Comment 3 Marian Petras 2005-10-19 09:45:43 UTC
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.
Comment 4 Marian Petras 2005-10-19 11:05:18 UTC
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
Comment 5 Martin Krauskopf 2005-10-19 11:16:05 UTC
Cool, this will save me few finger-aches ;) Just tested. Seems to work. Thanks.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo