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 13151 - [MDI] Ctrl-3 does not work if View menu expanded just once w/o editor window
Summary: [MDI] Ctrl-3 does not work if View menu expanded just once w/o editor window
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 3.x
Hardware: PC Linux
: P4 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords: A11Y
Depends on:
Blocks:
 
Reported: 2001-06-24 11:27 UTC by Jesse Glick
Modified: 2008-12-22 17:11 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Log file showing bug (65.26 KB, text/plain)
2003-01-07 02:05 UTC, Jesse Glick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2001-06-24 11:27:42 UTC
[dev jun 22, MDI] Ctrl-2 to select Explorer window does not seem to
work after the IDE has just been started. Later on it works
consistently. Sometimes Ctrl-3 does not work (just beeps) even when
sources (.java) are open. Not clear under what conditions these KB
shortcuts do or do not work, but they are not reliable.
Comment 1 David Simonek 2001-09-10 11:54:52 UTC
Radko, please try to find and reproduce conditions under which these
shortcuts don't work. If it looks like things works correctly, you'll
have to close as worksforme and ask Jesse for more detailed report.
Comment 2 Jesse Glick 2001-09-11 21:52:03 UTC
I don't think I've seen this happen recently. However there is some
general problem which frequently prevents *any* keystrokes from being
sent to the IDE, it seems, until the mouse is clicked somewhere; this
seems to happen after switching virtual desktops under Enlightenment.
Comment 3 Radko Najman 2001-09-12 17:47:51 UTC
Cannot reproduce - tested on Win2000, Solaris and Linux(Gnome+Sawfish). I don't have 
installed Linux on my computer so I cannot test it with Enlightenment.

I tried to use different shortcuts and they always worked for me. After discussion with 
Dafe closing as WORKSFORME.
Comment 4 Jesse Glick 2001-11-15 21:37:44 UTC
I have had no problems with Ctrl-2 recently. But Ctrl-3 is still
broken for me in [dev nov 15]. It seems to be the case that the first
time in an IDE session you use Ctrl-3, even with a source open (e.g.
after Alt-Sh-O), it just beeps and will not work. However View |
Source Editor is enabled and works. After using the menu item, the KB
shortcut starts to work and continues to work during that IDE session.
Comment 5 _ ttran 2001-11-21 17:39:53 UTC
Jesse, does it still happen to you?  If no then please close this bug.
 I suspect that those focus fixes recently can have impact on this.
Comment 6 Jesse Glick 2001-11-22 01:19:30 UTC
I don't remember seeing it in dev nov 21. Will pay attention to
whether it happens in upcoming builds.
Comment 7 Jan Chalupa 2001-11-27 11:51:17 UTC
Target milestone -> 3.3.1.
Comment 8 Jan Chalupa 2001-11-27 11:54:42 UTC
Target milestone -> 3.3.1.
Comment 9 _ ttran 2001-12-04 15:11:24 UTC
Jesse, does it work now?
Comment 10 _ ttran 2001-12-04 17:07:30 UTC
seems to work now.
Comment 11 Jesse Glick 2002-04-12 10:15:41 UTC
Just happened to me again in [dev apr 03] - Ctrl-3 did not work until
after View | Source Editor was selected once - but then I could not
reproduce in [dev apr 11]. I don't think it is truly fixed but I don't
know how to reliably reproduce.
Comment 12 Jesse Glick 2002-07-02 22:35:55 UTC
Still happens to me sometimes in 3.4 dev builds. 1.4.0_01, Sawfish,
MDI. But sometimes it works. More generally, for the past few months
focus seems to be unreliable, and sometimes it is hard to get KB focus
to a window - even clicking on it with the mouse does not always work,
sometimes you have to move to another desktop and randomly do stuff
and click on the window several times before it will get KB focus,
although the MDI window is marked as selected (highlighted frame
border etc.). Probably a JDK issue, too erratic to give precise
instructions to reproduce.
Comment 13 Marian Mirilovic 2002-09-05 12:01:39 UTC
It works for me : nb3.4 on Sol5.8/CDE and Win2K. 

Jesse, can I close this as verified or you can still reproduce it? 
Comment 14 Jesse Glick 2002-09-05 18:37:49 UTC
Still happens to me occasionally, but rarely. Just managed to
reproduce it today; using 1.4.1rc now. I doubt it will ever get fixed,
it is probably some kind of thread/focus thing.

Specifically what happens: after starting NB, even with some files
open in the Editor, other Ctrl-<digit> shortcuts will work (Ctrl-2,
Ctrl-4) but not Ctrl-3 (it will do nothing). View | Source Editor
(e.g. invoked via keyboard) works fine, and after that Ctrl-3 begins
working.

I could try to add debugging code to EditorViewAction if you want.

IMHO this should be marked WORKSFORME, not FIXED.
Comment 15 Marian Mirilovic 2002-09-06 08:08:55 UTC
It worksforme with [nb_dev](20020904) on [jdk1.4.0](02) &
[jdk1.4.1](rc1) and [sierra](020901) on [jdk1.4.0](02).

I reopen this one and I am going to change status to WORKSFORME.

Jesse: You can add debugging code, but only you are able to reproduce
it.
Comment 16 Marian Mirilovic 2002-09-06 08:09:21 UTC
see previous comment
Comment 17 Jesse Glick 2003-01-07 02:04:45 UTC
Finally tracked it down. Not a focus thing, just a weird sequence of
steps.

1. Start a dev build on a fresh user dir.

2. Close welcome window. Click on Explorer.

3. Shut down and restart, using
-J-Dorg.netbeans.core.actions.EditorViewAction=0 for debugging.

5. Navigate to e.g. ColorPicker.java and open it.

6. Press Ctrl-2. Explorer is focussed.

7. Press Ctrl-3. Editor is focussed (OK).

8. Close ColorPicker and restart, with same debug flag.

9. Open View menu (Alt-V) but then close again (Esc).

10. Open ColorPicker.java.

11. Ctrl-2 to focus Explorer.

12. -> Ctrl-3 does nothing! Explorer continues to have focus.

13. Open View menu and close again.

14. Now Ctrl-3 works - and will continue to work, unless you again use
the View menu (not selecting "Editor") when there are no editor
windows open, in which case you are back to step 12.

You can get Ctrl-3 to work again by selecting View -> Editor with an
editor window open.

Will attach log. Third session shows bug. First log block, right after
startup, shows View menu posted; EVA is disabled. Ctrl-3 after that
logs nothing: it is still disabled, so the KB dispatcher does not
bother even calling it. I then ran a class just to put a break in the
log file (Executor warning). When the View menu is posted again, with
an editor window open, addNotify causes enablement to be set to true,
after which it is called a couple of times with Ctrl-3 and works.

Possible fix: EVA.isAction should use logic similar to NodeAction, so
that when it is not addNotify'd (no one is listening to changes),
isEnabled directly checks for an open editor window; else call super.
Even more simply: addNotify/removeNotify only add/remove a
TopComponent.Registry listener; when there is any TC.R change, call
setEnabled(isEnabled()); and override isEnabled() to check the current
existence of an editor window.
Comment 18 Jesse Glick 2003-01-07 02:05:17 UTC
Created attachment 8458 [details]
Log file showing bug
Comment 19 Jesse Glick 2003-02-26 22:54:22 UTC
I can take this one - I think I know what to do with it.
Comment 20 Jesse Glick 2003-03-11 14:00:58 UTC
Probably won't have time to investigate for 3.5, and not so high
priority anyway.
Comment 21 Jesse Glick 2003-09-25 16:34:56 UTC
Not very common, and with an easy workaround -> treating as a P4.
Comment 22 Jesse Glick 2003-12-02 21:03:01 UTC
Assuming fixed by new winsys impl. Haven't seen anything similar since
then, at least, and it was surely rewritten.
Comment 23 Marian Mirilovic 2004-06-30 08:40:05 UTC
verified in [nb_dev](200406291800)