Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 370257 - Rebinding Ctrl+j is inconsistent
Summary: Rebinding Ctrl+j is inconsistent
Status: CLOSED DUPLICATE of bug 218881
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-31 13:32 EST by Alexander Glass CLA
Modified: 2012-02-01 03:33 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Glass CLA 2012-01-31 13:32:44 EST
Build Identifier: M20110909-1335

I have noticed a problem with rebinding the Ctrl+J shortcut on windows using different PCs and different versions of Eclipse 3.7.  By default Ctrl+J is bound to incremental find.  If you unbind this key, pressing ctrl+j inserts a line feed.  If you try and rebind the key to another action sometimes it rebinds properly and sometimes it does not.  What seems to happen after a certain period of time is the binding goes back to inserting line feeds.  If you restore defaults on keybindings Ctrl+J properply binds to incremental find.  This is quite frustrating as I like to have Ctrl+J bound to "run j-unit test".

Reproducible: Always

Steps to Reproduce:
1 Unbind Ctrl+J
2 Rebind Ctrl+J
3 Press Ctrl+J in text editor
4 Observe line feed inserted

Or 

1Unbind Ctrl+J
2 Press Ctrl+J in text editor
3 Observe line feed inserted
Comment 1 Dani Megert CLA 2012-02-01 03:33:37 EST
> If you unbind this key, pressing ctrl+j inserts a line feed. 
>
> 1Unbind Ctrl+J
> 2 Press Ctrl+J in text editor
> 3 Observe line feed inserted

That is the correct behavior: if no key binding is set, then it depends whether the the OS has bound this command. Under Windows most native editors do a line feed on Ctrl+J.

> 1 Unbind Ctrl+J
> 2 Rebind Ctrl+J
> 3 Press Ctrl+J in text editor
> 4 Observe line feed inserted

This is not what I see. If I rebind again to 'Incremental Find' or 'Open Type', it works as expected.


Having said that, I know what problem you run into. It's not specific to Ctrl+J but to the 'Run JUnit Test' command. This is captured by bug 218881.


Possible workaround: have the Debug views open in your workbench. This will ensure that Debug gets loaded and hence your shortcut will work. I know it's not perfect, but it works.

*** This bug has been marked as a duplicate of bug 218881 ***