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.
After running Fix Imports, if running on JDK 1.6, keyboard focus is lost. This is extremely irritating, as whenever one runs fix imports, it's necessary to reach for the mouse to send focus back to the editor. Mustang B60 through B65 exhibit this behavior. P2 because - It is possible that the Mustang behavior is correct and we are doing something wrong; if that's the case, then this behavior could be permanent with NB 5.0 + any version of Mustang. We should verify this. - For anyone using Mustang, it looks like a NB bug, not a Mustang bug, and it significantly affects workflow and efficiency - Mustang appears now to be in the release candidate phase, so it may not get fixed at all Please do not close this issue until there is a high priority bug reported against mustang to fix it, and ideally a workaround in the 5.0 branch that fixes the behavior on Mustang.
FYI, I encountered the problem on Windows - no idea if it's present on other platforms as well.
Reliably reproducible on Windows. I have rewritten "Fix imports progress dialog" to be created by DialogDisplayer.createDialog method. Before this change, it was a directly instantiated JDialog. It fixed the problem with lost focus. Checked in trunk. Checking in FixImportsProgressPanel.form; /cvs/java/editor/src/org/netbeans/modules/editor/java/FixImportsProgressPanel.form,v <-- FixImportsProgressPanel.form new revision: 1.2; previous revision: 1.1 Checking in FixImportsProgressPanel.java; /cvs/java/editor/src/org/netbeans/modules/editor/java/FixImportsProgressPanel.java,v <-- FixImportsProgressPanel.java new revision: 1.7; previous revision: 1.6 Checking in JavaFixAllImports.java; /cvs/java/editor/src/org/netbeans/modules/editor/java/JavaFixAllImports.java,v <-- JavaFixAllImports.java new revision: 1.20; previous revision: 1.19
*** Issue 69289 has been marked as a duplicate of this issue. ***
To test this issue for release50 will require to verify the fix for jdk1.5 and jdk1.6, on Windows and Linux (it worked for me on Windows, jdk1.5/1.6). In the past, there were some problems with disposing the progress dialog - it did not disappear upon finish of the action, so please also ensure that the fix will not cause this kind of problems.
The fix is OK
Is there some explanation for (1) why using a regular JDialog would cause focus problems, (2) why this only happens in Mustang?
Fix verified in trunk build 200601051900, please integrate to release50 branch.
For now, I don't have any explanation why using regular JDialog causes focus problems in Mustang. There are very similar progress dialogs in the refactoring module, created by DialogDisplayer.createDialog - they do not cause such problems. That was the reason why I hoped the fix would help. It will require additional investigation to find what makes the difference between jdk1.5 and 1.6.
Fix integrated into release50 branch. Checking in FixImportsProgressPanel.form; /cvs/java/editor/src/org/netbeans/modules/editor/java/FixImportsProgressPanel.form,v <-- FixImportsProgressPanel.form new revision: 1.1.48.1; previous revision: 1.1 Checking in FixImportsProgressPanel.java; /cvs/java/editor/src/org/netbeans/modules/editor/java/FixImportsProgressPanel.java,v <-- FixImportsProgressPanel.java new revision: 1.6.12.1; previous revision: 1.6 Checking in JavaFixAllImports.java; /cvs/java/editor/src/org/netbeans/modules/editor/java/JavaFixAllImports.java,v <-- JavaFixAllImports.java new revision: 1.19.2.1; previous revision: 1.19
Reorganization of java component