Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 57311

Summary: [key binding] Keyboard stops working after 'Source / Add Javadoc Comment'
Product: [Eclipse Project] JDT Reporter: Andre Costa <acosta>
Component: TextAssignee: JDT-Text-Inbox <jdt-text-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: eclipse, jdunrue
Version: 3.0   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Andre Costa CLA 2004-04-02 16:12:30 EST
Using 3.0M8. Everytime I run 'Source / Add Javadoc Comment', keyboard stops 
working (movement, regular chars, modifier keys) until I right-click the editor 
window.

Let me know if you need additional info.
Comment 1 Dani Megert CLA 2004-04-05 05:44:22 EDT
Works for me using I20040330. If you still see this using I20040330 or newer
please reopen and tell us whether you are using GTK or Motif.
Comment 2 Andre Costa CLA 2004-04-12 18:53:09 EDT
Ok, I finally installed a stream integration build (200404070800), and the 
problem still happens. I am using GTK2 version.

Let me know if there's any other info I can provide.
Comment 3 Andre Costa CLA 2004-04-12 19:26:02 EDT
... to make matters worse, it doesn't happen 100% of the times... =/ I am still  
trying to spot what is the exact situation that triggers the bug. I will report 
back if I find something else.
Comment 4 Dani Megert CLA 2004-04-13 02:55:50 EDT
Tom, did you ever see anything like that?

keeping as REMIND.
Comment 5 Tom Hofmann CLA 2004-04-13 04:20:35 EDT
@ comment 4: no, I have never seen this.
Comment 6 Andre Costa CLA 2004-04-13 12:08:12 EDT
I guess this might have something to do with my window managers, because I 
narrowed it down to being related to focus.
When I add a javadoc comment, it's as if eclipse had "ungrabbed" the keyboard, 
and it doesn't retake it even if I left-click anywhere on the editor window. The 
only ways to regain keyboard control are:

1. leaving eclipse window (not only the editor window) and coming back again 
(focus policy is set to "follow mouse"). This way the whole eclipse window loses 
focus
2. clicking on any menu item on the menubar
3. showing a popup by right-clicking on any view

Left-clicking on _any_ of the views (editor, navigator, outline etc.) when the 
keyboard is "frozen" doesn't do anything.

Relevant software versions:
Fedora Core 1 (up-to-date)
XFree86 4.3.0
AfterStep 1.8.11 (with focus policy set to "follow mouse")
GTK2 2.2.4

Maybe it can be reproduced on other window managers also set to "follow mouse".

HTH
Comment 7 Dani Megert CLA 2004-04-27 05:26:22 EDT
reopen to close as duplicate
Comment 8 Dani Megert CLA 2004-04-27 05:29:24 EDT
Not a duplicate.
Maybe reproducable by setting " "activation follows mouse" using TweakUI.
Comment 9 Fred Deniger CLA 2004-06-10 12:50:37 EDT
Using 3.0M9. java 1.4_04. Windows XP
 Sometimes, after I run 'Source / Add Javadoc Comment', keyboard works in qwerty
mode whereas I use a azerty keyboard
Comment 10 Jack D. Unrue CLA 2004-06-20 20:17:13 EDT
I am able to reproduce this behavior on 3.0-RC2 / Linux / KDE 3.2.2 with the GTK
build and -vmargs -Xms128M -Xms128M.  I've got GTK 2.4.1 installed.

In my case, it's not easy to reproduce but during a development session it will
happen several times.  It seems like the build progress dialog appears or the
JavaDoc popups are what triggers it for me.  And as the original bug report
noted, right-clicking in the editor is enough to restore use of the keyboard.
Comment 11 Dani Megert CLA 2004-06-21 03:00:01 EDT
Tom please try again with focus policy set to "follow mouse"
Comment 12 Tom Hofmann CLA 2004-06-21 05:24:29 EDT
reproducible when "focus follows mouse": 
- Have this class:

class C {
    void m() {
        System.out.println();
    }
}

- caret on println
- press F2
-> popup
- press Esc 
-> popup goes away
-> no keyboard focus, only the main menu works

Note:
- works if the mouse is over the popup - the focus policy will give the focus
back to the workbench when the popup goes away
- switching between applications fixes the problem.
- clicking into the editor fixes the problem


This is a dup of the "TweakUI/focus follows mouse" bug.
Comment 13 Tom Hofmann CLA 2004-06-21 06:01:03 EDT
marking as dup and chaning other PR's OS to all.

*** This bug has been marked as a duplicate of 39459 ***
Comment 14 Tom Hofmann CLA 2004-06-21 06:25:45 EDT
reopening ... the other bug is just for the completion proposal popup.

Cannot reproduce the case with Source-> Add Javadoc on RC3, even with 'Focus
follows mouse'. However, there are other cases that the focus is not returned to
the workbench window, as said in comment 12.
Comment 15 Tom Hofmann CLA 2004-06-21 06:50:30 EDT
I filed bug 67979 about the issues in comment 10 and comment 12. 

marking this as worksforme as it is not reproducible with any focus setting. I
believe that this might have been fixed by the solutions to any of bug 58642,
bug 65985 or bug 65053.

Please reopen if you still see this with RC3