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.

Bug 71019 - Focus lost after fix imports (mustang specific)
Summary: Focus lost after fix imports (mustang specific)
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Daniel Prusa
URL:
Keywords:
: 69289 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-01-04 20:44 UTC by _ tboudreau
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ tboudreau 2006-01-04 20:44:23 UTC
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.
Comment 1 _ tboudreau 2006-01-04 23:28:41 UTC
FYI, I encountered the problem on Windows - no idea if it's present on other 
platforms as well.
Comment 2 Daniel Prusa 2006-01-05 13:19:49 UTC
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
Comment 3 Daniel Prusa 2006-01-05 13:37:31 UTC
*** Issue 69289 has been marked as a duplicate of this issue. ***
Comment 4 Daniel Prusa 2006-01-05 13:47:40 UTC
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.
Comment 5 Jan Becicka 2006-01-05 15:27:29 UTC
The fix is OK
Comment 6 Jesse Glick 2006-01-05 16:01:34 UTC
Is there some explanation for (1) why using a regular JDialog would cause focus
problems, (2) why this only happens in Mustang?
Comment 7 Milan Kubec 2006-01-06 12:59:23 UTC
Fix verified in trunk build 200601051900, please integrate to release50 branch.
Comment 8 Daniel Prusa 2006-01-06 15:20:49 UTC
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. 
Comment 9 Daniel Prusa 2006-01-06 15:22:29 UTC
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
Comment 10 Quality Engineering 2007-09-20 11:57:50 UTC
Reorganization of java component