Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 388108 - Missing/Wrong keybinding for Select Previous/Next Element command
Summary: Missing/Wrong keybinding for Select Previous/Next Element command
Status: CLOSED DUPLICATE of bug 378684
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.2   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2012-08-27 09:04 EDT by Wolfgang Schell CLA
Modified: 2012-08-28 08:56 EDT (History)
2 users (show)

See Also:


Attachments
Screenshot of Keys preferences (137.05 KB, application/octet-stream)
2012-08-27 09:05 EDT, Wolfgang Schell CLA
no flags Details
Screenshot of Keys preferences (108.33 KB, image/png)
2012-08-28 06:56 EDT, Wolfgang Schell CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Wolfgang Schell CLA 2012-08-27 09:04:31 EDT
In my Juno installation on Mac OSX 10.8.1 (Build id: 20120614-1722), there are no  keybindings defined for Select Previous/Next Word commands for the Java and Structured Text editors, although there is one (ALT-SHIFT-LEFT/RIGHT arrow) for Text editors.

When I press ALT-SHIFT-LEFT within a Java source file, Select Next/Previous Element is performed (at least it looks this way: the first press selects the whole word, the next one the method call, etc.). 

When I copy this binding in the key preferences and add the ALT-SHIFT-LEFT/RIGHT binding for the Java and Structured Text Editors, everything works. I would have expected the Java editor to inherit the binding from Text editor. Otherwise, these bindings should be pre-defined.
Comment 1 Wolfgang Schell CLA 2012-08-27 09:05:36 EDT
Created attachment 220333 [details]
Screenshot of Keys preferences
Comment 2 Dani Megert CLA 2012-08-27 10:52:52 EDT
(In reply to comment #0)
> In my Juno installation on Mac OSX 10.8.1 (Build id: 20120614-1722), there
> are no  keybindings defined for Select Previous/Next Word commands for the
> Java and Structured Text editors, although there is one
> (ALT-SHIFT-LEFT/RIGHT arrow) for Text editors.

Can you try with http://download.eclipse.org/eclipse/downloads/drops4/R-4.2-201206081400/ and a fresh workspace?


Markus, can you double check this on a Mac? We assign different key bindings for Carbon. Maybe this no longer works in 4.2.
Comment 3 Dani Megert CLA 2012-08-27 10:57:32 EDT
ALT+SHIFT+ARROW should select the word
CTRL+SHIFT+ARROW_RIGHT should select the next element (Java only)
Comment 4 Markus Keller CLA 2012-08-27 11:32:58 EDT
Comment on attachment 220333 [details]
Screenshot of Keys preferences

Obsoleting this attachment since it is unreadable. Please use standard formats (PNG, TIFF, JPG, etc.).

Works fine for me in Juno. There's a single declaration with key binding Shift+Alt+Left for "Select Previous Word" in the text editor context (When: Editing Text). Key bindings in parent contexts are inherited by child contexts, so this is also active when editing Java text.

Note that you can lose key bindings in 4.2 when you switch to Emacs mode (bug 378684). Try "Restore Defaults".
Comment 5 Dani Megert CLA 2012-08-28 03:11:56 EDT
Please reopen if you can reproduce in a new workspace with 4.2 or newer.
Comment 6 Wolfgang Schell CLA 2012-08-28 06:56:33 EDT
Created attachment 220377 [details]
Screenshot of Keys preferences

Sorry for the wrong file format, I attached a PNG image.
Comment 7 Wolfgang Schell CLA 2012-08-28 06:59:10 EDT
I might have at some point accidentially switched key preferences to Emacs mode, but the problem was still there after restoring the default key settings. For me it only works with copied key bindings as specified in the attached image. Both CTRL-SHIFT-LEFT/RIGHT and OPTION-SHIFT-LEFT/RIGHT always perform Select Next/Previous Element instead of Select Next/Previous Word.
Comment 8 Wolfgang Schell CLA 2012-08-28 07:26:55 EDT
(In reply to comment #2)
> Can you try with
> http://download.eclipse.org/eclipse/downloads/drops4/R-4.2-201206081400/ and
> a fresh workspace?

Did that, it works as expected, i.e. no problems using ALT-SHIFT-RIGHT/LEFT to Select Next/Previous Word.

For good measure, I started my Juno 4.2 (Build id: 20120614-1722) JEE package with a fresh workspace (sorry for not trying that earlier). There, it also works as expected, so it must be a thing with my productive workspace (which originated some Eclipse versions ago). 

Any hints what I can do to "really reset" the key bindings apart from creating a new workspace? "Restore Defaults" from Keys preferences didn't help.
Comment 9 Paul Webster CLA 2012-08-28 08:26:33 EDT
(In reply to comment #8)
> 
> Any hints what I can do to "really reset" the key bindings apart from
> creating a new workspace? "Restore Defaults" from Keys preferences didn't
> help.

You won't see the real fix from bug 378684 until you pick up Eclipse 4.2.1/Juno SR1.  The manual workarounds for Juno are in bug 378684 comment #6

PW
Comment 10 Wolfgang Schell CLA 2012-08-28 08:56:29 EDT
(In reply to comment #9)
> (In reply to comment #8)
> You won't see the real fix from bug 378684 until you pick up Eclipse
> 4.2.1/Juno SR1.  The manual workarounds for Juno are in bug 378684 comment #6

Yes! That did the trick. Thanks you so much, this was driving me nuts (and I often switch/create workspaces, so I don't want to configure the bindings manually...)

Closing as duplicate of bug 378684

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