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

Bug 317299

Summary: Impossible to set or change key bindings
Product: [Eclipse Project] e4 Reporter: Dani Megert <daniel_megert>
Component: UIAssignee: Paul Webster <pwebster>
Status: VERIFIED FIXED QA Contact: Paul Webster <pwebster>
Severity: blocker    
Priority: P3 CC: bokowski, deepakazad, henrik, jessev, Mike_Wilson, mlists, remy.suen
Version: 1.0   
Target Milestone: 4.1 RC1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on: 335985    
Bug Blocks:    
Attachments:
Description Flags
Keep binding service up to date v01
none
Let the model drive commands and keybindings v02
none
binding service updates v03
none
binding service updates v04 none

Description Dani Megert CLA 2010-06-18 10:05:37 EDT
I20100617-2238.

Key bindings can no longer be assigned or changed: the changes made on the 'Keys' preference page seem to be ignored and an error logged:

!ENTRY org.eclipse.ui 4 4 2010-06-18 16:01:40.228
!MESSAGE unsupported: savePreferences
Comment 1 Dani Megert CLA 2010-06-18 10:06:23 EDT
The 'Keys' page should be removed from 4.0 if this can't be fixed.
Comment 2 Mike Wilson CLA 2010-07-09 09:12:30 EDT
I'd be very close to arguing that being unable to change key bindings is a stop ship.

If we are not going to have this capability, then in addition to removing the page, we need to have a clear, well-written blog post (that should probably become part of the readme) that describes the fact that we _intend_to_provide_ this capability, but didn't get there in time for 4.0. It should also include an accurate description of why the old code didn't work (i.e. the old code better not be just calling API!) and how it will be done in the 4.0 world.

Q: Can keybindings be changed with the model tooling?
Comment 3 Paul Webster CLA 2010-07-09 14:28:29 EDT
Created attachment 173891 [details]
Keep binding service up to date v01

We need to propagate changes from our model to the e4 binding service.

PW
Comment 4 Paul Webster CLA 2010-07-12 14:56:53 EDT
Phase 1 released - remove the prefs page.
PW
Comment 5 Paul Webster CLA 2010-07-14 11:28:49 EDT
Created attachment 174304 [details]
Let the model drive commands and keybindings v02

This is the commands portion, I need to incorporate attachment #173891 [details] still

PW
Comment 6 Paul Webster CLA 2010-07-15 15:56:14 EDT
Created attachment 174442 [details]
binding service updates v03

Changes from the live model editor get reflected in the binding service ... but unfortunately, to quickly (all the attributes change).

PW
Comment 7 Paul Webster CLA 2010-07-16 10:23:26 EDT
Created attachment 174494 [details]
binding service updates v04

This is decent BindingPersistence -> model -> EBindingService.  You can use the live model editor to add simple keybindings.

1) the commands disappear over a restart, leaving the bindings with no command.  This is one of the general problems we have with Workbench converting plugin.xml to model, we have to remove it on shutdown, save the deltas, and then add it back and apply the deltas.  But because the workbench often starts late, it is included in deltas calculations instead of being part of the pre-loaded model.

2) parameters are hard to do in the live model editor.  We don't provide the equivalent of org.eclipse.core.commands.IParameterValues (which in the case of something like Show View is a contribution object that can return live information).

PW
Comment 8 Dani Megert CLA 2010-09-21 10:36:19 EDT
Not being able to edit key bindings is a blocker if we assume 4.1 should be the successor of 3.x.
Comment 9 Dani Megert CLA 2011-05-03 02:48:20 EDT
It now partially works but there are still bugs with it, see bug 344181 and bug 344182.
Comment 10 Paul Webster CLA 2011-05-13 14:42:49 EDT
This is now resolved.  The Compatibility layer reads and edits the 3.x bindings, and creates/deletes the model for the runtime system.

We will continue to open bugs for specific failure cases.

PW
Comment 11 Dani Megert CLA 2011-05-16 07:14:47 EDT
Verified in 4.1 build: I20110515-0800.