Bug 59934 - Navigator lacks focus when first shown on a given file
Navigator lacks focus when first shown on a given file
Status: RESOLVED WORKSFORME
Product: java
Classification: Unclassified
Component: Navigation
4.x
All All
: P4 (vote)
: 6.x
Assigned To: David Simonek
issues@java
: FOCUS
: 52871 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-06-14 12:59 UTC by Jesse Glick
Modified: 2007-05-26 00:22 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2005-06-14 12:59:12 UTC
Dev builds, Mustang. When I press Ctrl-7 on a Java source, the Navigator window
appears (I keep it in autohide mode) but there is no selection and no KB focus.
Have to hide it (ESCAPE) then Ctrl-7 again; then the first element is selected
and KB focus works normally. After switching to a different Java file, the first
Ctrl-7 again gives no focus.
Comment 1 Jesse Glick 2005-07-28 15:57:00 UTC
Still true, by the way. Minor but annoying.
Comment 2 David Simonek 2005-09-29 16:32:38 UTC
Everything works OK on Windows, as usual. Does it happen with current builds? I
even implemented in NavigatorJList:

    /** Always select some element when focused */
    public boolean requestFocusInWindow () {
        boolean result = super.requestFocusInWindow();
        if (getSelectedIndex() == -1 && getModel().getSize() > 0) {
            setSelectedIndex(0);
        }
        return result;
    }

So I don't know what to do more. Please reopen if this error is still happening.
Comment 3 Jesse Glick 2005-09-30 02:48:51 UTC
Still happens in current dev builds, current Mustang.

It seems that it happens only if the navigator window is initially empty and
displays "Parsing..."; after the actual method tree appears, there is no focus.
If the method tree is available immediately there is focus.
Comment 4 David Simonek 2005-09-30 12:01:22 UTC
Yes, finally I could reproduce! It seems that you are slowly learning how to
submit info that makes the bug fixable for me :-))
Comment 5 David Simonek 2005-09-30 13:20:15 UTC
really nasty bug. It seems that focus in Swing is for experts only ;-) hopefully
fixed in main trunk:

Checking in base/ModelBusyListener.java;
/cvs/java/navigation/src/org/netbeans/modules/java/navigation/base/ModelBusyListener.java,v
 <--  ModelBusyListener.java
new revision: 1.3; previous revision: 1.2
done
Checking in base/NavigatorJList.java;
/cvs/java/navigation/src/org/netbeans/modules/java/navigation/base/NavigatorJList.java,v
 <--  NavigatorJList.java
new revision: 1.4; previous revision: 1.3
done
Checking in ClassMemberPanel.java;
/cvs/java/navigation/src/org/netbeans/modules/java/navigation/ClassMemberPanel.java,v
 <--  ClassMemberPanel.java
new revision: 1.5; previous revision: 1.4
done
Checking in ClassMemberPanelUI.java;
/cvs/java/navigation/src/org/netbeans/modules/java/navigation/ClassMemberPanelUI.java,v
 <--  ClassMemberPanelUI.java
new revision: 1.6; previous revision: 1.5
done
Checking in spi/ListModelSupport.java;
/cvs/java/navigation/src/org/netbeans/modules/java/navigation/spi/ListModelSupport.java,v
 <--  ListModelSupport.java
new revision: 1.3; previous revision: 1.2
Comment 6 Jesse Glick 2005-10-04 00:08:13 UTC
Sorry about that, I just never noticed the condition that triggers it before a
few days ago.
Comment 7 Jesse Glick 2005-10-17 22:49:10 UTC
*** Issue 52871 has been marked as a duplicate of this issue. ***
Comment 8 Jesse Glick 2005-10-17 22:49:57 UTC
I think I just saw it happen again in a dev build. Might have to reopen if it
keeps happening...
Comment 9 Jesse Glick 2005-10-19 20:20:38 UTC
Yup, still happening to me. Mustang, Linux. No way to reproduce reliably that I
know of.
Comment 10 David Simonek 2005-10-20 08:07:28 UTC
aaaaaa I can't belive it. !%$#@%@$* focus :-)
Comment 11 Jesse Glick 2005-10-20 17:30:01 UTC
P5 might be appropriate since the workaround is easy - Escape to go back to the
editor, then Ctrl-7 again and it generally has focus by then.
Comment 12 Jesse Glick 2007-05-26 00:22:17 UTC
Don't think I've seen it recently.


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