Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 377963

Summary: Restarting brings emacs scheme keybindings back
Product: [Eclipse Project] Platform Reporter: Paul Webster <pwebster>
Component: UIAssignee: Paul Webster <pwebster>
Status: RESOLVED FIXED QA Contact:
Severity: critical    
Priority: P3 CC: ob1.eclipse
Version: 4.2Flags: ob1.eclipse: review+
Target Milestone: 4.2 RC1   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Paul Webster CLA 2012-04-27 15:08:57 EDT
I started up a clean workspace inner.  Create a plugin project with one of the examples, then navigate around an open java editor.

I switched to the emacs scheme on Preferences>General>Keys, and then CTRL+A moves the the beginning of the line, and CTRL+K deletes the line (with a popup) and F9 is undo.

I switched back to the default key scheme.  Now CTRL+A selects all and CTRL+Z is undo.

If I restart and start moving around, CTRL+A moves to the beginning of the line again, and CTRL+Z is moving the editor up and down.

PW
Comment 1 Oleg Besedin CLA 2012-05-01 09:54:40 EDT
For me error happens even before that. 
- Switch to Emacs keybindings
- Shutdown Eclipse and start it up again
- Note errors "Failed to map binding"
- Note that while preferences say Emacs keybindings are enabled, Ctrl+A selects all text


The log on the re-start:

Failed to map binding: org.eclipse.e4.ui.model.application.commands.impl.KeyBindingImpl@59a02097 (elementId: null, tags: [schemeId:org.eclipse.ui.emacsAcceleratorConfiguration], contributorURI: null) (keySequence: Esc, W)
Failed to map binding: org.eclipse.e4.ui.model.application.commands.impl.KeyBindingImpl@2259a735 (elementId: null, tags: [schemeId:org.eclipse.ui.emacsAcceleratorConfiguration], contributorURI: null) (keySequence: Ctrl+X, H)
Failed to map binding: org.eclipse.e4.ui.model.application.commands.impl.KeyBindingImpl@20c3e967 (elementId: null, tags: [schemeId:org.eclipse.ui.emacsAcceleratorConfiguration], contributorURI: null) (keySequence: Ctrl+X, K)
Failed to map binding: org.eclipse.e4.ui.model.application.commands.impl.KeyBindingImpl@1e1079ff (elementId: null, tags: [schemeId:org.eclipse.ui.emacsAcceleratorConfiguration], contributorURI: null) (keySequence: Ctrl+X, S)
Failed to map binding: org.eclipse.e4.ui.model.application.commands.impl.KeyBindingImpl@7844ffb2 (elementId: null, tags: [schemeId:org.eclipse.ui.emacsAcceleratorConfiguration], contributorURI: null) (keySequence: Ctrl+X, U)
Failed to map binding: org.eclipse.e4.ui.model.application.commands.impl.KeyBindingImpl@3166aab6 (elementId: null, tags: [schemeId:org.eclipse.ui.emacsAcceleratorConfiguration], contributorURI: null) (keySequence: Ctrl+5, E)
Failed to map binding: org.eclipse.e4.ui.model.application.commands.impl.KeyBindingImpl@4b51ac10 (elementId: null, tags: [schemeId:org.eclipse.ui.emacsAcceleratorConfiguration], contributorURI: null) (keySequence: Ctrl+X, Ctrl+S)
Failed to map binding: org.eclipse.e4.ui.model.application.commands.impl.KeyBindingImpl@5ef77511 (elementId: null, tags: [schemeId:org.eclipse.ui.emacsAcceleratorConfiguration], contributorURI: null) (keySequence: Ctrl+X, R)
Failed to map binding: org.eclipse.e4.ui.model.application.commands.impl.KeyBindingImpl@1a3526cf (elementId: null, tags: [schemeId:org.eclipse.ui.emacsAcceleratorConfiguration], contributorURI: null) (keySequence: Esc, R)
Failed to map binding: org.eclipse.e4.ui.model.application.commands.impl.KeyBindingImpl@1786ed7a (elementId: null, tags: [schemeId:org.eclipse.ui.emacsAcceleratorConfiguration], contributorURI: null) (keySequence: Ctrl+X, Ctrl+C)
Failed to map binding: org.eclipse.e4.ui.model.application.commands.impl.KeyBindingImpl@1b50f0a7 (elementId: null, tags: [schemeId:org.eclipse.ui.emacsAcceleratorConfiguration], contributorURI: null) (keySequence: Ctrl+X, B)
Failed to map binding: org.eclipse.e4.ui.model.application.commands.impl.KeyBindingImpl@5ee771f3 (elementId: null, tags: [schemeId:org.eclipse.ui.emacsAcceleratorConfiguration], contributorURI: null) (keySequence: Ctrl+X, Ctrl+B)
Failed to map binding: org.eclipse.e4.ui.model.application.commands.impl.KeyBindingImpl@2cea3932 (elementId: null, tags: [schemeId:org.eclipse.ui.emacsAcceleratorConfiguration], contributorURI: null) (keySequence: Ctrl+X, Ctrl+F)
Failed to map binding: org.eclipse.e4.ui.model.application.commands.impl.KeyBindingImpl@455118a7 (elementId: null, tags: [schemeId:org.eclipse.ui.emacsAcceleratorConfiguration], contributorURI: null) (keySequence: Esc, F9)
Failed to map binding: org.eclipse.e4.ui.model.application.commands.impl.KeyBindingImpl@5a790192 (elementId: null, tags: [schemeId:org.eclipse.ui.emacsAcceleratorConfiguration], contributorURI: null) (keySequence: Esc, D)
Failed to map binding: org.eclipse.e4.ui.model.application.commands.impl.KeyBindingImpl@36b79701 (elementId: null, tags: [schemeId:org.eclipse.ui.emacsAcceleratorConfiguration], contributorURI: null) (keySequence: Ctrl+X, Ctrl+X)
Failed to map binding: org.eclipse.e4.ui.model.application.commands.impl.KeyBindingImpl@4f1adeb7 (elementId: null, tags: [schemeId:org.eclipse.ui.emacsAcceleratorConfiguration], contributorURI: null) (keySequence: Esc, F)
Failed to map binding: org.eclipse.e4.ui.model.application.commands.impl.KeyBindingImpl@3622e177 (elementId: null, tags: [schemeId:org.eclipse.ui.emacsAcceleratorConfiguration], contributorURI: null) (keySequence: Alt+0, Ctrl+K)
Failed to map binding: org.eclipse.e4.ui.model.application.commands.impl.KeyBindingImpl@4805e9f1 (elementId: null, tags: [schemeId:org.eclipse.ui.emacsAcceleratorConfiguration], contributorURI: null) (keySequence: Esc, 0, Ctrl+K)
Failed to map binding: org.eclipse.e4.ui.model.application.commands.impl.KeyBindingImpl@4d811e2c (elementId: null, tags: [schemeId:org.eclipse.ui.emacsAcceleratorConfiguration], contributorURI: null) (keySequence: Esc, Z)
Failed to map binding: org.eclipse.e4.ui.model.application.commands.impl.KeyBindingImpl@57e40274 (elementId: null, tags: [schemeId:org.eclipse.ui.emacsAcceleratorConfiguration], contributorURI: null) (keySequence: Ctrl+X, G)
Failed to map binding: org.eclipse.e4.ui.model.application.commands.impl.KeyBindingImpl@354124d6 (elementId: null, tags: [schemeId:org.eclipse.ui.emacsAcceleratorConfiguration], contributorURI: null) (keySequence: Esc, Shift+>)
Failed to map binding: org.eclipse.e4.ui.model.application.commands.impl.KeyBindingImpl@50152643 (elementId: null, tags: [schemeId:org.eclipse.ui.emacsAcceleratorConfiguration], contributorURI: null) (keySequence: Esc, B)
Failed to map binding: org.eclipse.e4.ui.model.application.commands.impl.KeyBindingImpl@651ee017 (elementId: null, tags: [schemeId:org.eclipse.ui.emacsAcceleratorConfiguration], contributorURI: null) (keySequence: Esc, Backspace)
Failed to map binding: org.eclipse.e4.ui.model.application.commands.impl.KeyBindingImpl@15d45d9 (elementId: null, tags: [schemeId:org.eclipse.ui.emacsAcceleratorConfiguration], contributorURI: null) (keySequence: Esc, <)
Failed to map binding: org.eclipse.e4.ui.model.application.commands.impl.KeyBindingImpl@1294aa42 (elementId: null, tags: [schemeId:org.eclipse.ui.emacsAcceleratorConfiguration], contributorURI: null) (keySequence: Ctrl+X, [)
Failed to map binding: org.eclipse.e4.ui.model.application.commands.impl.KeyBindingImpl@5e35dc95 (elementId: null, tags: [schemeId:org.eclipse.ui.emacsAcceleratorConfiguration], contributorURI: null) (keySequence: Esc, Shift+<)
Failed to map binding: org.eclipse.e4.ui.model.application.commands.impl.KeyBindingImpl@2224ea85 (elementId: null, tags: [schemeId:org.eclipse.ui.emacsAcceleratorConfiguration], contributorURI: null) (keySequence: Esc, V)
Failed to map binding: org.eclipse.e4.ui.model.application.commands.impl.KeyBindingImpl@5dbbd583 (elementId: null, tags: [schemeId:org.eclipse.ui.emacsAcceleratorConfiguration], contributorURI: null) (keySequence: Esc, >)
Failed to map binding: org.eclipse.e4.ui.model.application.commands.impl.KeyBindingImpl@56bebb88 (elementId: null, tags: [schemeId:org.eclipse.ui.emacsAcceleratorConfiguration], contributorURI: null) (keySequence: Ctrl+X, ])
Comment 2 Paul Webster CLA 2012-05-03 16:25:58 EDT
I don't have that problem yet, but I do see a problem related to the binding processing addon

I've pushed a fix that is needed but doesn't fix the whole story up in branch pwebster/bug377963

Oleg, if you get a chance could you run the test again in an inner with my branch?

PW
Comment 3 Oleg Besedin CLA 2012-05-03 16:57:03 EDT
(In reply to comment #2)
> I don't have that problem yet, but I do see a problem related to the binding
> processing addon
> 
> I've pushed a fix that is needed but doesn't fix the whole story up in branch
> pwebster/bug377963
> 
> Oleg, if you get a chance could you run the test again in an inner with my
> branch?
> 
> PW

Seems to be the same as before as far as comment 1 goes.
Comment 4 Paul Webster CLA 2012-05-03 17:41:44 EDT
(In reply to comment #3)
> 
> Seems to be the same as before as far as comment 1 goes.

And that happens if you start off in an empty workspace?  Or your standard runtime workspace?

PW
Comment 5 Paul Webster CLA 2012-05-04 09:55:14 EDT
OK, with my latest commits on pwebster/bug377963 the scheme doesn't switch on restart.

Switching to emacs makes CTRL+A, CTRL+E and F9 work.  On a restart, they still work.  CTRL+L and CTRL+K get popups because bindings are defined in the same contexts in each scheme.

Switching back to default scheme lets CTRL+A and CTRL+Z, and CTRL+E work again.

But CTRL+L and CTRL+K no longer open the popup, CTRL+L and CTRL+K register no keybinding at all.

PW
Comment 6 Oleg Besedin CLA 2012-05-04 11:30:20 EDT
With the latest changes thing are better.

I still get the "Failed to map binding" messages.

scenario1: clean workspace -> switch to Emacs -> restart
	Ctrl+A works as expected, Cltr+L brings up the popup, as expected

scenarion2: (1) as above + switch back to default
	Ctrl+A works as expected, CTlr+L DOES NOT work at all

Scenario3: (2) as above + restart
	Ctrl+A works as expected, CTlr+L DOES NOT work at all
Comment 7 Paul Webster CLA 2012-05-04 15:16:32 EDT
When I can release pwebster/bug377963 this will be fixed.  I'll deal with the CTRL+L, CTRL+K problem in bug 375762

PW
Comment 8 Paul Webster CLA 2012-05-07 06:28:43 EDT
Oleg, I need a +1 for this bug.

PW
Comment 9 Oleg Besedin CLA 2012-05-07 10:59:23 EDT
+1. I opened the following bugs for smaller problems that can be now observed:

bug 378684 Ctrl+L disappears after switching to Emacs and back
bug 378685 Errors in the log after switching to Emacs keybindings
Comment 10 Paul Webster CLA 2012-05-11 15:03:21 EDT
This was released as 38f63f69ac6c1c863187abc70d1930efc7b17868

Restarting now at least leaves the (somewhat broken) scheme intact.

Working in bug 375762


PW