Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 136264 - [KeyBindings] Hiding eclipse disables some keybindings
Summary: [KeyBindings] Hiding eclipse disables some keybindings
Status: RESOLVED DUPLICATE of bug 139711
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.2   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 normal with 3 votes (vote)
Target Milestone: 3.3 M4   Edit
Assignee: Paul Webster CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 140995 146401 152105 154879 157835 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-04-12 00:38 EDT by Matthew Conway CLA
Modified: 2007-07-29 09:19 EDT (History)
10 users (show)

See Also:


Attachments
trace with problem duplicated (186.25 KB, application/octet-stream)
2006-05-06 22:09 EDT, Matthew Conway CLA
no flags Details
another trace exhibiting the problem (649.42 KB, application/octet-stream)
2006-09-19 11:30 EDT, Jared R. White CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Conway CLA 2006-04-12 00:38:28 EDT
If I use the hide keybinding (Command/Apple-H), then Cmd-tab back to eclipse, most keybindings don't work (e.g. Open type, Cmd-Shift-T).  The keybinding hints in menus have all disappeared too.

If I then I Cmd-Tab out to another app, then Cmd-tab back into eclipse, the key bindings start working again.

eclipse 3.2M6 on os x 10.4.5 using java 1.4.2_09
Comment 1 Paul Webster CLA 2006-04-26 10:47:36 EDT
Could you please start running with a -debug <file> that contains:

org.eclipse.ui/debug=true
org.eclipse.ui/trace/keyBindings=true
org.eclipse.ui/trace/keyBindings.verbose=true
org.eclipse.ui/trace/sources=true
org.eclipse.ui/trace/handlers=true
org.eclipse.ui/trace/handlers.verbose=true
org.eclipse.ui/trace/contexts=true
org.eclipse.ui/trace/contexts.verbose=true

Pipe the output to log file.  ex, I use:
eclipse -debug debug.options >tracing.log 2>&1
but I'm not sure how to do that on a Mac.

I look at the "points" in the log where:
CMD+SHIFT+T works
CMD+SHIFT+T doesn't work
CMD+SHIFT+T works

Thanx,
PW
Comment 2 Paul Webster CLA 2006-05-06 11:57:15 EDT
Were you able to reproduce the problem?

PW
Comment 3 Matthew Conway CLA 2006-05-06 13:43:19 EDT
I doesn't always happen on startup, sometimes it takes a while before it shows up, and of course, I never seem to be running with tracing enabled when it happens because command line eclipse doesn't run well on os x ( see bug 139994 ) :(

I just setup a script for launching eclipse with tracing enabled, to avoid the above issue, which I'll run till I can duplicate it - hopefully this weekend sometime (using RCC3 now)

On a related (?) note, sometimes the Hide key (Cmd-H) itself stops working (Eclipse menu flashes like its doing something, but nada), and then I _really_ can't duplicate it :)  Either way, you should get something out of the log.

In fact Hide key aint working right now, with tracing enabled!  expect a trace soon :)
Comment 4 Matthew Conway CLA 2006-05-06 22:05:56 EDT
Ok, I was mistaken in my last comment, I wasn't running from the command line when Cmd-H stopped working.

However, I did manage to reproduce the original problem with tracing enabled.  I think the problem exhibits itself after suspending/reawakening my laptop since it wasn't there after startup and right before I closed the lod, but was there as soon as I opened the lid.

Its a little hard to figure out where in the logfile what happens, but I determined the size of the file before starting the sequence below (2403878 bytes), and marked that point (search for *** in the attached log file), so at least you know exactly what I'm doing from that point on:

Cmd-tab to eclipse
Cmd-shift-t (works)
Cmd-h (hide)
Cmd-tab to eclipse
Cmd-shift-t (doesn't work)
Cmd-tab out and back in again
Cmd-shift-t (works)

this is with 3.2RC3
Comment 5 Matthew Conway CLA 2006-05-06 22:09:08 EDT
Created attachment 40557 [details]
trace with problem duplicated

If you need a finer granularity of when I hit which key, let me know of a way to do it since I can't edit the file while its being written to, and if I switch to a terminal to look at the size of the file at that point, those keypresses will affect behavior as well as what goes in the trace!
Comment 6 Mike Wilson CLA 2006-05-07 09:07:57 EDT
Is this the same/related to bug 139711?
Comment 7 Paul Webster CLA 2006-05-10 12:35:59 EDT
*** Bug 140995 has been marked as a duplicate of this bug. ***
Comment 8 Brad Reynolds CLA 2006-06-12 00:29:41 EDT
I'm affected by this as well running 3.2RC7 but I'm not able to reproduce it by just hiding Eclipse and coming back to the app.  It seems to be random but if I can figure out a pattern I'll create a log file.
Comment 9 Channing Walton CLA 2006-06-12 02:14:19 EDT
(In reply to comment #6)
> Is this the same/related to bug 139711?
> 

I think it might be except for me, my context menu also loses shortcuts. I've also noticed that they sometimes come back after I've fiddled with the eclipse window, or minimised/maximised. I haven't worked out anything consistent.

Channing
Comment 10 Alex Blewitt CLA 2006-06-13 16:19:13 EDT
*** Bug 146401 has been marked as a duplicate of this bug. ***
Comment 11 Alex Blewitt CLA 2006-06-13 16:52:59 EDT
I've been able to recreate this on 3.2RC7 on Mac 10.4.6(PPC) with Java 5 installed. After hiding, regardless of how I reactivate (Cmd+Tab/clicking on dock) the Command+ keystrokes seem to go missing, until I switch to another app and back again (again, either with Cmd+Tab or clicking on the dock).
Comment 12 Jared R. White CLA 2006-07-05 14:07:10 EDT
Confirming that the problem remains in 3.2.0 (M20060629-1905), on 10.4.7 (Intel) running Java 5.

Is there anything we can do to assist the Eclipse team debug this? I'd be happy to provide trace files to supplement Matt Conway's trace if that would be of value. Thanks!
Comment 13 Jared R. White CLA 2006-07-05 17:38:43 EDT
Also, I've noticed that (at least in my case) it does not matter how I send Eclipse into the background/foreground. The problem will sometimes occur even if I click on my desktop and then back into the Eclipse window. It also happens if I click on the dock to switch apps. It seems that cmd-tab, cmd-h, etc are just variations on the theme of losing and then regaining focus.
Comment 14 Paul Webster CLA 2006-07-28 08:00:43 EDT
*** Bug 152105 has been marked as a duplicate of this bug. ***
Comment 15 Channing Walton CLA 2006-08-07 15:40:46 EDT
Hi,
I just woke my mac from sleep and eclipse was running. My accelerators were missing on all the menus, also content assist didn't work. I had a look in my console.log which had the stack below. I don't know if it helps at all but its just more info.

Exception in thread "AutoAssist Delay" org.eclipse.swt.SWTException: Failed to execute runnable (org.eclipse.jface.text.Assert$AssertionFailedException: null argument;)
	at org.eclipse.swt.SWT.error(SWT.java:3374)
	at org.eclipse.swt.SWT.error(SWT.java:3297)
	at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:178)
	at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:28)
	at org.eclipse.swt.widgets.Display.syncExec(Display.java:3825)
	at org.eclipse.jface.text.contentassist.ContentAssistant$AutoAssistListener.showAssist(ContentAssistant.java:336)
	at org.eclipse.jface.text.contentassist.ContentAssistant$AutoAssistListener.run(ContentAssistant.java:252)
	at java.lang.Thread.run(Thread.java:613)
Caused by: org.eclipse.jface.text.Assert$AssertionFailedException: null argument;
	at org.eclipse.jface.text.Assert.isNotNull(Assert.java:157)
	at org.eclipse.jface.text.Assert.isNotNull(Assert.java:133)
	at org.eclipse.jface.text.contentassist.ContentAssistant.setRepeatedInvocationTrigger(ContentAssistant.java:2125)
	at org.eclipse.jdt.internal.ui.text.java.ContentAssistProcessor$2.assistSessionStarted(ContentAssistProcessor.java:163)
	at org.eclipse.jface.text.contentassist.ContentAssistant.fireSessionBeginEvent(ContentAssistant.java:1992)
	at org.eclipse.jface.text.contentassist.ContentAssistant.prepareToShowCompletions(ContentAssistant.java:1469)
	at org.eclipse.jface.text.contentassist.ContentAssistant.access$6(ContentAssistant.java:1462)
	at org.eclipse.jface.text.contentassist.ContentAssistant$2.run(ContentAssistant.java:345)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3181)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2936)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95)
	at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
	at org.eclipse.core.launcher.Main.run(Main.java:977)
	at org.eclipse.core.launcher.Main.main(Main.java:952)
Comment 16 Grant Gayed CLA 2006-08-24 12:52:26 EDT
*** Bug 154879 has been marked as a duplicate of this bug. ***
Comment 17 Jared R. White CLA 2006-09-19 11:30:34 EDT
Created attachment 50474 [details]
another trace exhibiting the problem

On line 59702, the repeated key commands to save and find have no effect. I then moused around in the menu bar and confirmed that the keyboard shortcut information was missing. Then I switched focus to the Finder and then back to Eclipse. Finally, on line 59925, I type command-S and the save takes place.
Comment 18 Boris Bokowski CLA 2006-09-19 12:18:41 EDT
*** Bug 157835 has been marked as a duplicate of this bug. ***
Comment 19 Jared R. White CLA 2006-09-19 18:44:31 EDT
I also noticed that code suggestions do not appear when Eclipse is in the problematic state. Switching focus away from and then back to Eclipse restored the auto-completion capability. Hopefully that's a useful clue.
Comment 20 Patrick Sifneos CLA 2007-01-15 02:42:35 EST
This happens on my Mac as well, every single time I'm hiding the application and switch then back, all shortcuts are lost. I always have to switch to another application and then back. Unfortunately, this is not just a bug, this is a major bug, i will have to change back to jBuilder
Comment 21 Dani Megert CLA 2007-01-15 03:55:32 EST
Patrick, are all key bindings lost or just some specific ones? Which build are you using.
Comment 22 Patrick Sifneos CLA 2007-01-15 04:08:41 EST
Yep, all key bindings are gone. Build id: 20061111-5.1.0-GA
Comment 23 Dani Megert CLA 2007-01-15 04:16:36 EST
What's that build id? That doesn't sound like an Eclipse SDK build id. What version is it (3.2.1?).

Are the key bindings also lost in the default text editor or are really all, including global key bindings like e.g. Ctrl+H to open the Search dialog lost?
Comment 24 Patrick Sifneos CLA 2007-01-15 07:14:59 EST
Well, this is MyEclipse Build Id. I got eclipse 3.2.1. I dont' know where to find build nr from eclipse¨
Comment 25 Dani Megert CLA 2007-01-15 09:15:30 EST
Patrick,
could you please check whether the same problem appears if just using Eclipse SDK 3.2.1 (http://download.eclipse.org/downloads/drops/R-3.2.1-200609210945/index.php) with no additional plug-ins? Thanks.
Comment 26 Patrick Sifneos CLA 2007-01-15 09:28:29 EST
Sir, I just downloaded the 3.2.1 version. I started Eclipse with no othe plug-ins, unfortunately i got the same effect.
Comment 27 Silenio Quarti CLA 2007-01-15 17:21:35 EST
>This happens on my Mac as well, every single time I'm hiding the application
>and switch then back, all shortcuts are lost. I always have to switch to
>another application and then back. Unfortunately, this is not just a bug, this
>is a major bug, i will have to change back to jBuilder

I believe this problem has been fixed in 3.3 already (See bug#139711). Please try the latest build.
Comment 28 Patrick Sifneos CLA 2007-01-16 02:58:40 EST
Yes, I just download build 3.3 M4 and it works, yeahh!!! Thank you guys, that was a major problem for me.

Thanks!!!!
Comment 29 Matthew Conway CLA 2007-01-17 13:48:24 EST
I can confirm that this problem ssems to have disappeared in 3.3M4 for me as well - lets hope it stays that way :)
Feel free to close this bug if appropriate.
Comment 30 Channing Walton CLA 2007-01-23 17:04:33 EST
(In reply to comment #29)
> I can confirm that this problem ssems to have disappeared in 3.3M4 for me as
> well - lets hope it stays that way :)

Me too.
Comment 31 Paul Webster CLA 2007-01-23 18:46:55 EST

*** This bug has been marked as a duplicate of bug 139711 ***
Comment 32 Eclipse Webmaster CLA 2007-07-29 09:19:27 EDT
Changing OS from Mac OS to Mac OS X as per bug 185991