| Summary: | The "Delete Line" key binding actually deletes 3 lines. | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Missing name Mising name <alopecoid> |
| Component: | SWT | Assignee: | Platform-SWT-Inbox <platform-swt-inbox> |
| Status: | RESOLVED WORKSFORME | QA Contact: | |
| Severity: | major | ||
| Priority: | P3 | CC: | alopecoid, burnabyjeff, daniel_megert, lshanmug, markus.kell.r, prakash, pwebster, remy.suen, skovatch |
| Version: | 3.6 | Keywords: | needinfo |
| Target Milestone: | --- | ||
| Hardware: | Macintosh | ||
| OS: | Mac OS X | ||
| Whiteboard: | |||
|
Description
Missing name Mising name
It works fine for me. Which editor does this happen? Does this happens on a fresh workspace too? (In reply to comment #1) > It works fine for me. Which editor does this happen? I have noticed it in the Java editor, but perhaps it happens in others as well. > Does this happens on a fresh workspace too? Yes. If you change the keybinding do you get the same effect? (In reply to comment #3) > If you change the keybinding do you get the same effect? No, if I change the key binding, everything works as expected. What's interesting is, when I change the key binding back to Command-D, the Command-D appears three times in the "Binding:" text box. I can manually delete two of these, but obviously what is happening here is that for some strange reason Eclipse is interpreting one Command-D press as three. I wonder why this is? Just to note, no other application seems to have this problem. For example, just to name a few applications similar to Eclipse: NetBeans, IntelliJ IDEA, jEdit. All of these applications interpret the Command-D key press properly, so this is definitely something specific to Eclipse. (In reply to comment #4) > (In reply to comment #3) > > If you change the keybinding do you get the same effect? > > No, if I change the key binding, everything works as expected. > > What's interesting is, when I change the key binding back to Command-D, the > Command-D appears three times in the "Binding:" text box. I can manually delete > two of these, but obviously what is happening here is that for some strange > reason Eclipse is interpreting one Command-D press as three. > > I wonder why this is? Just to note, no other application seems to have this > problem. For example, just to name a few applications similar to Eclipse: > NetBeans, IntelliJ IDEA, jEdit. All of these applications interpret the > Command-D key press properly, so this is definitely something specific to > Eclipse. Hi, Are there any updates on this? I have tried once again from a fresh workspace, but the results are the same. This is such a common shortcut (in almost all applications) and I have become so used to it that this problem had rendered Eclipse too annoying for me to use. Is there any other information I can help with to get this bug resolved? Thank you. (In reply to comment #5) > > Is there any other information I can help with to get this bug resolved? I still couldn't reproduce this one. Assigning to Platform-text. >Is there any other information I can help with to get this bug resolved? Yes, please provide a step by step example including the full source you use for it and use Mac build from here: http://download.eclipse.org/eclipse/downloads/drops/R-3.6-201006080911/index.php Also, which OS exactly and which VM are you using? (In reply to comment #4) > What's interesting is, when I change the key binding back to Command-D, the > Command-D appears three times in the "Binding:" text box. That clearly shows that the problem is not in Text. Probably an SWT problem, but could also be a problem in the key bindings implementation, or a bug in a third-party plug-in. (In reply to comment #7) > Also, which OS exactly and which VM are you using? Please also tell whether you use the Carbon or the Cocoa build. > (In reply to comment #7)
> > Also, which OS exactly and which VM are you using?
>
> Please also tell whether you use the Carbon or the Cocoa build.
OS:
Mac OS X 10.5.8
Eclipse:
Eclipse IDE for Java Developers
Version: Helios Release
Build id: 20100617-1415
File: eclipse-java-helios-macosx-cocoa-x86_64.tar.gz
Java:
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02-279-9M3165)
Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01-279, mixed mode)
(In reply to comment #9) > > (In reply to comment #7) > > > Also, which OS exactly and which VM are you using? > > > > Please also tell whether you use the Carbon or the Cocoa build. > > OS: > > Mac OS X 10.5.8 > > Eclipse: > > Eclipse IDE for Java Developers > Version: Helios Release > Build id: 20100617-1415 > File: eclipse-java-helios-macosx-cocoa-x86_64.tar.gz > > Java: > > java version "1.6.0_20" > Java(TM) SE Runtime Environment (build 1.6.0_20-b02-279-9M3165) > Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01-279, mixed mode) Actually, the file I used to "install" eclipse is: eclipse-SDK-3.6-macosx-cocoa-x86_64.tar.gz I have tried a fresh "install" with a fresh workspace, and I still get the problem. Could someone else try this exact same package to see if the problem can be replicated elsewhere? All the other keyboard shortcuts that I have tried seem to work fine... only Command-D seems to be interpreted 3 times per press. I really don't think this is environment-related, since NetBeans, IntelliJ IDEA, and jEdit all function properly, and running on the same JVM. Thank you. Hi,
So I tried coding up a small SWT application to test this problem...
final StyledText styledText = new StyledText(...);
styledText.addVerifyKeyListener(new VerifyKeyListener() {
@Override public void verifyKey(VerifyEvent event) {
System.out.printf("%s ", Integer.toHexString(event.character));
}
});
If I run this snippet and type Command-D, the output is "0 64 64 64 ".
So it seems that SWT is the culprit here. I am using swt-3.6-cocoa-macosx-x86_64.
(In reply to comment #11) > Hi, > > So I tried coding up a small SWT application to test this problem... > > final StyledText styledText = new StyledText(...); > styledText.addVerifyKeyListener(new VerifyKeyListener() { > @Override public void verifyKey(VerifyEvent event) { > System.out.printf("%s ", Integer.toHexString(event.character)); > } > }); > > If I run this snippet and type Command-D, the output is "0 64 64 64 ". > > So it seems that SWT is the culprit here. I am using > swt-3.6-cocoa-macosx-x86_64. I have a hunch that maybe someone could investigate? Perhaps the 64-bit version started as the 32-bit version, and was then modified as needed. Perhaps during this modification, someone did a search for "32" and replaced it with "64". In this case, since 64 is hex for 'd', perhaps multiple code branches end up reacting to 'd' while the Command key is pressed, hence it is repeated multiple times. It's just a hunch without looking at the code. Could someone more familiar with the code see if this is possibly the case? Also, as a quick smoke screen, perhaps someone could test the above snippet on the 32-bit version of SWT? I cannot run it since I only have the 64-bit JVM. Thank you. (In reply to comment #10) > (In reply to comment #9) > > > > OS: > > > > Mac OS X 10.5.8 > > > > Eclipse: > > > > Eclipse IDE for Java Developers > > Version: Helios Release > > Build id: 20100617-1415 > > File: eclipse-java-helios-macosx-cocoa-x86_64.tar.gz I am on 10.6, but I don't see this behavior in a stock 3.6 release of Eclipse, in either 32- or 64-bit Cocoa. If I hold down command-D I eventually see the 64's repeat, 3 at a time, so there is potentially a bug there. What are your key repeat settings? See System Preferences -> Keyboard. Which keyboard layout are you using? (In reply to comment #13) > I am on 10.6, but I don't see this behavior in a stock 3.6 release of Eclipse, > in either 32- or 64-bit Cocoa. If I hold down command-D I eventually see the > 64's repeat, 3 at a time, so there is potentially a bug there. > > What are your key repeat settings? See System Preferences -> Keyboard. Which > keyboard layout are you using? I'll check this later today. But if the problem were a result of these settings, wouldn't other applications have the same issue? No other applications seem to be having this problem, including similar Java applications such as NetBeans, IntelliJ IDEA, jEdit, etc. (In reply to comment #14) > I'll check this later today. But if the problem were a result of these > settings, wouldn't other applications have the same issue? No other > applications seem to be having this problem, including similar Java > applications such as NetBeans, IntelliJ IDEA, jEdit, etc. No, not necessarily. It sounds like this is happening because we're generating multiple SWT.KeyDown events. I'm just trying to find out if we're not handling the key-repeat case properly. (In reply to comment #14) > > What are your key repeat settings? See System Preferences -> Keyboard. Which > > keyboard layout are you using? I checked my key repeat settings, and they are nothing out of the ordinary. I tried adjusting them to both the min and max values, but this didn't have any effect on the problem... no matter what, Eclipse/SWT give me three key presses instead of one for Command-D. Any other ideas? Thanks. (In reply to comment #16) > I checked my key repeat settings, and they are nothing out of the ordinary. I > tried adjusting them to both the min and max values, but this didn't have any > effect on the problem... no matter what, Eclipse/SWT give me three key presses > instead of one for Command-D. Is it just command-D that triggers this? Does your test case have the same result for all command key pairs? (In reply to comment #17) > (In reply to comment #16) > > Is it just command-D that triggers this? Does your test case have the same > result for all command key pairs? Oh, I see you tried changing the binding in comment #4, but does your test case do the right thing for another command key pair? (In reply to comment #18) > (In reply to comment #17) > > (In reply to comment #16) > > > > Is it just command-D that triggers this? Does your test case have the same > > result for all command key pairs? > > Oh, I see you tried changing the binding in comment #4, but does your test case > do the right thing for another command key pair? Yes, I mentioned this in comment #10... all other key combinations that I have tried seem to work fine. This doesn't necessarily mean that there are no other problems, but out of all the ones that I use on a regular basis, Command-D seems to be the only combination giving me problems. Has anyone looked into my "wild hunch" that I mentioned in comment #12? Is there any update on this? This has made Eclipse on the Mac completely unusable for me for 4+ months now. (In reply to comment #20) > Is there any update on this? No, because we haven't been able to reproduce it. Let's see if we can get more information about what's going on with your machine. In your test case in comment #11, can you re-run it with a Thread.dumpStack() call just before the printf? Attach the stack trace. Also, to help rule out some other preference or extension causing problems, please create a new user, log in as that user, and then try to reproduce the problem. Since Eclipse is more of a Cocoa app as opposed to an AWT application, there are other things that may be interfering. (In reply to comment #21) This is a bug for me as well, just as alopecoid reported. > Also, to help rule out some other preference or extension causing problems, > please create a new user, log in as that user, and then try to reproduce the > problem. Since Eclipse is more of a Cocoa app as opposed to an AWT application, > there are other things that may be interfering. I did as you suggested, I created a new user on my Mac Mini, and went directly to Safari and downloaded the same version of eclipse that is giving me the problem. It DOES NOT HAPPEN with the new user, which is interesting. I do have a workaround: just change the 'delete line' binding to 'command-d command-d', so that when it interprets a single press as two presses, it executes the command just once. *** Bug 338745 has been marked as a duplicate of this bug. *** I'm unable to reproduce this and haven't seen any recent reports of this problem. Closing it, please reopen if you see this problem again. |