Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 95276 - [key binding] edit key commands occuring on a tab that is not in focus
Summary: [key binding] edit key commands occuring on a tab that is not in focus
Status: RESOLVED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.1   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P2 major with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Silenio Quarti CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 100885 102748 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-05-14 15:47 EDT by Dave Feil CLA
Modified: 2013-02-20 14:50 EST (History)
11 users (show)

See Also:


Attachments
Help - about eclipse - configuration details (223.75 KB, text/plain)
2005-05-17 13:13 EDT, Dave Feil CLA
no flags Details
Preferences Screenshots (410.85 KB, application/zip)
2005-05-18 15:40 EDT, Dave Feil CLA
no flags Details
Detailed configuration of my installation from Help > About > Installation Details > Configuration (see comment from 2013-02-20) (518.37 KB, text/plain)
2013-02-20 14:50 EST, Michael Z CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Feil CLA 2005-05-14 15:47:21 EDT
After a shor time of use on eclipse 3.1 M6 and M7 OS X (possibly others), keyboard edit commands (copy, 
paste, delete, etc) are performed on a tab that is no longer on top.  For example, i have 2 .java files open, 
each in a tab.  Edit file 1 for a while.  use keyboard to copy a block of code, switch to file 2 by clicking on 
the tab, click cursor at insert point, and use keyboard to paste.  Nothing shows up, but switching back to 
tab 1 i noticed that it was pasted there.  The front tab or the tab with focus does not seem to be capturing 
all the keyboard events.  To get around this it seems i have to right click and use the copy/paste menu 
options instead.  I have also noticed that using the delete key sometimes affects a tab that is not currently 
on top. All letter and number keys work.
Comment 1 Dave Feil CLA 2005-05-14 16:00:43 EDT
Actually, every time this has happened i have had more than 2 file open.  Also, closing all files and 
opening again does not usually help.  I can try to capture more specifics if needed.
Comment 2 Kim Horne CLA 2005-05-16 15:19:09 EDT
Not sure if this is related to the undo support or not.  I seem to recall a bug similar to this but I thought 
that it was addressed for 3.1.
Comment 3 Susan McCourt CLA 2005-05-16 17:05:56 EDT
Dave - we need a little more info to help pin this down, specifically what you 
are seeing in M7.

There were some bugs in M6 that could contribute to this problem:
- bug #92070 involved undo running on the wrong editor, but I never heard a 
report of other keys (copy, paste, delete) having the same problem.
- bug #92049 involved problems when the active editor changed. This resulted in 
the edit menu not being properly associated with the active editor. 

I'm also looking at bug #94419 in M7 involving undo being set on the wrong 
editor.  I'm going to take a look at it again and see if cut/copy/paste are 
also affected.

If all of the edit menu commands are going to the wrong editor, then this would 
not be an undo problem, but rather something wrong with the way the editor 
pulldown is installed on editor activation.
Comment 4 Dave Feil CLA 2005-05-16 17:21:28 EDT
I am seeing the same exact behavior as described in M7.  I have tried turning off some of the "check for 
errors as you type" type features to see if it helped.  Still see the problem.  I have also noticed that the 
Undo or (apple-z) affects the wrong editor.  I noticed this when i attempted to paste something and it 
didn't paste to the front editor, so i immediatly did an (apple-z) and i believe it undid the paste on the 
hidden editor.  I will try to reproduce and gather more info.

Another condition i saw:  copy some text in editor 1, click on editor 2, paste text.  Lets say this one 
worked.  Later, copy text on editor 3, click on 4th editor, paste text.  The text does not get pasted to 
editor 4 but rather editor 3, and the text that gets pasted is the text from the first copy back on editor 1.  I 
can't promise this is the exact editor clicks but something similar to this happed.  I'll note some more 
specifics as i see them.
Comment 5 Susan McCourt CLA 2005-05-16 18:20:20 EDT
Thanks, Dave.
Since all text commands are affected, I am moving this bug to Platform-Text.
Comment 6 Dani Megert CLA 2005-05-17 08:34:34 EDT
Dave, I still cannot reproduce this. We need some info, please see:
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-text-home/development/bug-incomplete.htm

In addition:
- double-check that you are really using 3.1 M7 (I20050513-1415)
- what are the settings on Window > Preferences > Editors
- do the commands work if you execute them via
    - context menu
    - main Edit menu
- you initially wrote that it starts to fail after a shor time. Can you confirm 
  that it works in the beginning?
Comment 7 Dani Megert CLA 2005-05-17 08:53:18 EDT
This looks like a duplicate of bug 95222.

Dave, is the Help view open in your workbench? If so, try whether you can get
rid of the bug by closing this view.
Comment 8 Douglas Pollock CLA 2005-05-17 10:50:24 EDT
I believe Bug 92070 affected all text editor commands, not just undo.  It was an
interaction between how the text editor did things and changes made to how part
events were fired.

This is not a duplicate of Bug 95222.  Bug 95222 is very Linux specific.

Is this bug still supposed to be assigned to Susan?
Comment 9 Dani Megert CLA 2005-05-17 11:08:16 EDT
Doug, I'm a bit confused and maybe you have more info than I do:
- bug 92070 and its dups only reported problems with undo/redo actions and there
were reproducible steps. No other problems with commands reported there.
- I found the bug reported in bug 92070 in the way the undo/redo actions got
contributed and fixed it. After that the reported scenarios work just fine
- you wrote bug 95222 is very Linux specific so I assume you already tracked
that down to be Linux only. If so we need to file a new bug report for the
scenario I repored in bug 95222, comment 2 and comment 3.
Comment 10 Douglas Pollock CLA 2005-05-17 11:53:19 EDT
There was a problem introduced by a change made by Stefan Xenos to part events
in which a change in the order of how WorkbenchPage worked would cause retarget
actions to continue to work on the previous editor.  I thought this was Bug
92070, but I could be wrong.  You'd best ask Stefan.
Comment 11 Dave Feil CLA 2005-05-17 13:11:29 EDT
In response to comment #6:
From help about:
Eclipse Platform
Version: 3.1.0
Build id: I20050513-1415

Some pieces from System Summary:
os.arch=ppc
os.name=Mac OS X
os.version=10.4

java version "1.4.2_07"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_07-215)
Java HotSpot(TM) Client VM (build 1.4.2-50, mixed mode)

I'll attach the entire system summary to show editor preferences.

The commands DO work when you right click or control click and select a menu item with the mouse.  
They also work from the edit menu at the top.  Just seems to affect keyboard edit commands.

It does in fact work at the begining.  The after a time and some editing has occured, it starts to fail.  
Restarting eclipse fixes the problem until it happens again.  

I just tried to reproduce over the last 15 minutes and couldn't.  But, It has been happening a couple 
times a day so i'll pay attention to the log when it happens again.
Comment 12 Dave Feil CLA 2005-05-17 13:13:47 EDT
Created attachment 21275 [details]
Help - about eclipse - configuration details
Comment 13 Douglas Pollock CLA 2005-05-17 13:21:49 EDT
Please see Bug 92148 for a similar problem, but this was fixed and verified in
3.1 M7.
Comment 14 Susan McCourt CLA 2005-05-17 13:39:14 EDT
re: comment #9 and comment #10
Bug #92070 affected all platforms and involved only undo/redo.  But around the 
same time, bug #92049 was being fixed.  This is the bug introduced by Stefan 
that Doug is referring to.  In #92070, all undo/redo was running improperly, 
from both the pulldown and the popup menu.  We've seen no recurrence of this 
problem since fixed.

The symptoms in bug #94419 (currently assigned to me) involve differences 
between the behavior of Edit>Undo in the pulldown and Undo in the popup.  We 
saw some of this behavior in M6 (can't find the bug #) but there are still 
problems in M7.

The symptoms for this bug as reported by Dave (works and then stops, affect 
ONLY the keyboard) sound different than other bugs I've mentioned in this 
comment.
Comment 15 Dave Feil CLA 2005-05-18 01:18:13 EDT
It happened again.  Have not been able to do much intensive .java editing today to reproduce it.  This time 
i double clicked on a function name within a method, and hit F3 to get the method def to show.  Instead it 
brought me to the class "String".  So i tried to copy paste next to see if it was in this strange behavior.  I 
selected a small method, apple-c, then cursor to right below the same method, apple-v.  A .java file in 
another tab received a "*" by the name becuase whatever i paste just showed up on that file.  I clicked on 
the tab of the affected file and it pasted the word "String" that i had copied to the clipboard a few minutes 
ago.  definetly the same problem.  I did do a "references of" search just before this happened.   I'll try 
some more things that involve moving focus to other "views"

No log entries when this happened in the os x console.log.  
Comment 16 Dani Megert CLA 2005-05-18 05:21:31 EDT
Dave, please attach a screenshot of Window > Preferences > Editors. It's hard to
decode all those settings from the attached config details.

And some questions regarding your last comment:

>, and hit F3 to get the method def to show.  Instead it 
>brought me to the class "String".
What exacttly did you select and where did it bring you inside String? Was
another editor opened (i.e. there's now one more editor tab than before)?

>So i tried to copy paste next to see if it was in this strange behavior.  I 
>selected a small method, apple-c, then cursor to right below the same method,
>apple-v.
You tried copy and paste inside the "String" class?
Comment 17 Dave Feil CLA 2005-05-18 13:01:10 EDT
Thats correct.  a new tab opened for the String class.  However there was no source for the String class so 
it showed the generic text that indicates there is no source.  i closed the tab right away. I assume since it 
though i had selected "String" (because that was what was in the clipboard?)  when i hit F3 it loaded the 
string class into another tab.  Seems like normal behavior if i had in fact selected the word "String" in one 
of the other tabs.  I will do screenshots
Comment 18 Dave Feil CLA 2005-05-18 15:40:55 EDT
Created attachment 21380 [details]
Preferences Screenshots
Comment 19 Dani Megert CLA 2005-05-18 16:12:28 EDT
Thanks for the screenshots. They tell us
- multiple editor tabs are used
- editors aren't closed automatically
Comment 20 Dave Feil CLA 2005-05-24 14:05:05 EDT
it happened again in a similar way to previous times.  Still have not found the exact reproduce steps yet 
though.  Some info:

- had about 10 .java files open
- 3 of them had compile errors
- perform a "references of" search on a static method (done by right clicking on the method in the 
"Members" view and choosing References - Workspace)
- double click on one of the search results to bring up a new .java file.
- copied a method name from the source
- switch tabs and paste.  paste occured on the wrong tab.  occurred on the tab where the search was 
run from.  

I tried to follow these steps again and it did NOT happen.  Still trying to narrow in on it.  Might have 
something to do with search view or giving focus to another view?

Comment 21 Dave Feil CLA 2005-05-24 14:08:02 EDT
I should also add that i was able to recover from this by closing the tab that the paste occurred on.  
Otherwise all edit keys would continue to affect that tab.  I did not have to restart eclipse to recover.
Comment 22 Dani Megert CLA 2005-05-30 12:09:33 EDT
We can still not reproduce this. Can you please try 3.1 RC?

André, have you seen anything like this on the MAC?
Comment 23 Andre Weinand CLA 2005-05-30 12:28:36 EDT
Yes, I've seen this two times with M7 on my vacation (so I didn't perform any heavy editing).
Comment 24 Dave Feil CLA 2005-06-11 00:33:21 EDT
When this occurs, i can close the tabs to reset things, but i am noticing that code completion (hitting 
apple-space) does not work ever again until i restart eclipse.  

Nobody else has seen this?  I see it every day on both my dual G4 tower and my G4 powerbook.  The bug 
is now marked as resolved?
Comment 25 Dani Megert CLA 2005-06-11 05:03:32 EDT
Please swtich to I20050610-1757 and see whether it happens there as well.
Comment 26 Dave Feil CLA 2005-06-12 13:14:28 EDT
After a few minutes of using Version: 3.1.0 Build id: I20050610-1757 the same behavior occurs.  This 
time i changed some code in a superclass that caused about 10 errors in subclasses.  From the "Problems" 
view i am double clicking on each problem and resoving it (Need to add a paramter to a method on each).  
So focus is bouncing back and forth between the problem view and the tabs that get opened.  After about 
8 of these, i typed the new paramter class name "Connection" and then type command-space to have code 
completion pop up for me.  This time it did not pop up.  I noticed immediately that if i try to paste 
something, it did the paste into a tab that was not in focus or on top.
Comment 27 Dani Megert CLA 2005-06-13 08:57:38 EDT
Still no luck reproducing this on WindowsXP. Tom is now trying on Linux and
André will look at it on the Mac.
Comment 28 Tom Hofmann CLA 2005-06-13 09:31:24 EDT
not reproducable either with 3.1-RC2 on Linux/GTK.
Comment 29 Tobias Widmer CLA 2005-06-14 09:47:11 EDT
I was not able to reproduce the issue described in comment 0 using 3.1 RC2 on 
OS X.
Comment 30 Dani Megert CLA 2005-06-20 14:22:08 EDT
André, we have another instance of this bug. Could you invest some time and help
us to track this down? Did you have additional plug-ins installed when this
happened (see bug 100885)?
Comment 31 Dani Megert CLA 2005-06-20 14:22:11 EDT
*** Bug 100885 has been marked as a duplicate of this bug. ***
Comment 32 Terry Brugger CLA 2005-06-20 18:18:44 EDT
As Daniel observed, I'm seeing the same thing -- everything that Dave describes is exactly what I'm 
seeing. A lot of guys around here are using Eclipse with the same general config as mine on the same 
codebase, only all of them are on Windows & Linux, so I feel pretty confident this is a Mac-specific bug.

The only major difference that I saw on my configuration from Dave's is that I'm running OS 10.3 with 
JDK 1.4.2_05, and I've been seeing this through RC2. One thing I started to think about when I was 
writing my bug report and that I wonder about Dave's configuration is which 3rd party plugins are 
being used. I've got XMLBuddy and SQL Explorer.

Now that Dave mentions it, it probably is closing the offending tabs that returns life to normal for me, 
and now I have a pretty good idea why my command-space stopped working last week.

What does RESOLVED->REMIND mean? I don't think I've seen that one in a Bugzilla before.
Comment 33 Dave Feil CLA 2005-06-20 18:27:16 EDT
With my latest upgrade to Version: 3.1.0 Build id: I20050610-1757 i am on a very clean install with only 
one plugin that isn't default from eclipse.org: 

SYSDEO Tomcat Plugin 3.0.0.alpha1

Before this upgrade i may have had some non-functioning visual editor plugins but the behavior does not 
seem to be any different.
Comment 34 Dani Megert CLA 2005-06-21 01:55:30 EDT
.
Comment 35 Dani Megert CLA 2005-06-21 01:56:04 EDT
Since this only happens on MAC I'm moving to SWT for comments. See also bug 100696.
Comment 36 Andre Weinand CLA 2005-06-21 04:21:26 EDT
I did some heavy (but fake) editing for more than an hour with Eclipse 3.1 RC3 on Mac OS X 10.4.1 with no 
additional plug-ins installed.
I was using an new workspace and created a project with 8 source files, created errors; fixed them and 
copied/pasted text back and forth. I tried to combine all the steps mentioned in the various comments of 
this bug report.
But I wasn't able to reproduce the problem.
Comment 37 Douglas Pollock CLA 2005-06-21 10:16:55 EDT
Dave: For as long as this bug has been going on, have you been using MacOS X
10.4?  Have you updated the OS at some point (perhaps to MacOS X 10.4.1)?  Can
you reproduce the problem with no additional plug-ins installed?  Do you have
any other applications running at the same time?

Andre: Have you only ever tried to reproduce this bug using MacOS X 10.4.1?
Comment 38 Andre Weinand CLA 2005-06-22 05:54:27 EDT
No, I've tried to reproduce the problem on 10.3.9 and 10.4 as well, but without success.
Comment 39 Andre Weinand CLA 2005-06-22 13:37:37 EDT
Could this be related to bug #100737 ?
Comment 40 Douglas Pollock CLA 2005-06-22 13:52:26 EDT
Andre:  I doubt it.  Bug 100737 relies on a property that exists in views but
not editors: the pane can appear in one perspective and not in others.  However,
if it is the same problem, then I would expect the editor tab would not paint
with the active colour.
Comment 41 Dave Feil CLA 2005-06-23 01:00:29 EDT
(In reply to comment #37)
> Dave: For as long as this bug has been going on, have you been using MacOS X
> 10.4?  Have you updated the OS at some point (perhaps to MacOS X 10.4.1)?  Can
> you reproduce the problem with no additional plug-ins installed?  Do you have
> any other applications running at the same time?
> 
> Andre: Have you only ever tried to reproduce this bug using MacOS X 10.4.1?
> 

I have seen the problem on OS X 10.3 , 10.4 and now on 10.4.1.  No noticable difference between 
them.  I have not tried to develop without the tomcat plugin, i can try to do that and see what happens.  
I have a minimum of 7 other programs running at all times.

Comment 42 Douglas Pollock CLA 2005-06-23 09:57:38 EDT
Dave: What non-Apple applications do you tend to have running?
Comment 43 Dave Feil CLA 2005-06-23 11:31:21 EDT
(In reply to comment #42)
the only non-apple one is dreamweaver MX 2004 7.0.1.  I would guess that every time i have been using 
eclipse that program is also open.  I switch back and forth between them quite a bit.  But when the errors 
occur in eclipse i am usually focused on eclipse for an extended period.
Comment 44 Steve Northover CLA 2005-06-23 18:20:26 EDT
SSQ, do you think this could be caused by the "post instead of send to avoid 
the Mac GP" that we do for shell activation?
Comment 45 Douglas Pollock CLA 2005-07-05 13:40:39 EDT
*** Bug 102748 has been marked as a duplicate of this bug. ***
Comment 46 Yu-Hong Wang CLA 2005-07-05 16:15:04 EDT
I have experienced this bug with every release of 3.1 since M1. It is still present in the 3.1 release. I'm 
using no additional plug-ins and have no non-Apple applications open. It occurs on every release of Mac 
OS X from 10.3.8 to 10.4.1.

I can also confirm that command completion breaking after closing the background tab (comment 24) is 
also happening in 3.1 release.
Comment 47 Dave Feil CLA 2005-07-11 18:08:50 EDT
This also still happens for me in Rel 3.1. 

I am seeing some sort of pattern forming for when it happens.  When the copy and paste commands 
fail, i immediatly stop and try to remember what i just did.  I can remember many times when i would 
be coding for quite a while, switching between tabs,  without any problems, and then suddenly the edit 
commands would fail.  Just before the failure in many cases, i had just done a "references of" or 
"declarations of" type search where i would bring focus to the search results view and possibly open 
another tab by double clicking on a search result.  Prior to the search, i was clicking very regularly 
between tabs and also in the Projects, Packages, Types, and Members views without a problem.  But 
then when i do a search things start to fail.  Another offender might be the Hierarchy view.  Hope this 
helps some.

In today's case, i was working problem free for a couple hours before i did a hierarchy or a search (i did 
both at about the same time) and then i started to see edit command failures.
Comment 48 Michael Harm CLA 2006-02-14 10:07:10 EST
Is there a chance that this bug is related to bug 68069?   

What are the plans on fixing this bug?  It's currently blocking all the mac developers on our team from moving from 3.0 to 3.1, and has been since summer '05.   It's been seven months since the last entry on this bug... are mac users so low on the priority list that a p2/major, saying that something as basic as copy/paste doesn't work, can languish this long?  
Comment 49 Silenio Quarti CLA 2006-11-06 22:37:58 EST
Can anyone reproduce this problem in the latest 3.3 (or 3.2)? I have never been able to reproduce it and I will probably close it as WORKSFORME if nobody has seen it.
Comment 50 Dave Feil CLA 2006-11-07 01:19:08 EST
I am using the latest Version: 3.3.0
Build id: I20060922-0010

I have not seen this behavior in quite a while (6 months or so?) and i still use eclipse all day every day on OSX 10.4.8.  I think it could be considered closed.  Sorry for not reporting that. 

Wonder if there was a specific fix put in for it or if it went away with something being rewritten?  Either way, eclipse is amazing
Comment 51 Terry Brugger CLA 2006-11-07 12:05:50 EST
I'll top that -- I'm still using 3.1.1 and haven't seen this in ages. I'm also up to 10.4.8, so it either got fixed between 3.1 and 3.1.1, or was something really obscure in OS X that got quietly fixed in some point release.

I would feel comfortable marking this as WORKSFORME.
Comment 52 Silenio Quarti CLA 2006-11-07 12:56:35 EST
Ok, I believe this was fixed by Bug#92070. Please reopen if anyone sees this again.
Comment 53 Carmen Alvarez CLA 2012-07-17 10:48:11 EDT
I am seeing this on Juno (20120614-1722) on Ubuntu 12.04.
Comment 54 Michael Z CLA 2013-02-19 15:48:29 EST
I'm also seeing this with Juno (M20120914-1800) on Ubuntu 12.10.

I'd be happy to provide you with more Info, just tell me what you need and where to get it. I'm only doing PHP-Development with this Eclipse installation.
Comment 55 Michael Z CLA 2013-02-20 14:46:04 EST
This is more for People encountering the same problem than for helping to find and fix the bug:

I switched to Kepler (4.3.0 M5a or "I20130204-1400") and the problem went away. Also I installed a PDT 3.2.0 nightly build, which works only with DLTK 5.0 nightly build from

https://hudson.eclipse.org/hudson/job/dltk-nightly/lastStableBuild/artifact/org.eclipse.dltk.releng/build/update.site/target/site/


(that is an update site)

I hope the problem won't reappear but when I started work today it was there instantaneous and I havent seen it for many hours after the update with doing anything other than I did before.

I will attach my configuration details.

Good luck.
Comment 56 Michael Z CLA 2013-02-20 14:50:30 EST
Created attachment 227359 [details]
Detailed configuration of my installation from Help > About > Installation Details > Configuration (see comment from 2013-02-20)