Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 320091 - [Tools] liveeditor generates invalid keybindings
Summary: [Tools] liveeditor generates invalid keybindings
Status: RESOLVED FIXED
Alias: None
Product: e4
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 1.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 1.0 RC3   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-16 07:30 EDT by Paul Webster CLA
Modified: 2010-07-17 09:13 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Webster CLA 2010-07-16 07:30:30 EDT
When I try and add a binding to a binding table, I get incomplete key sequences typed in "CTR", "CTRL+" etc.

Most of what the MKeyBinding has is invalid, and that's making it hard to add and remove them.

PW
Comment 1 Thomas Schindl CLA 2010-07-16 10:23:02 EDT
The problem you see is that I listen on SWT.Modify. I've 2 different solutions to the problem:
a) I add a Validator which checks checkbindings
   (Is there a method in the binding code I can use to validate?)
b) Modify the content on focus-out

I can't fix this problem before tomorrow because I'm traveling until tonight. Ideally I could implement a) but I need to know what a valid binding is (I could also check for duplicates).
Comment 2 Paul Webster CLA 2010-07-16 10:27:19 EDT
With my last set of changes to bug 317299 it's not as urgent (I reject bindings with invalid key sequences).

We should try and add a couple of bindings, even one with a parameter like:

org.eclipse.ui.navigate.showIn
org.eclipse.ui.navigate.showIn.targetId=org.eclipse.jdt.ui.PackageExplorer
CTRL+5 P

PW
Comment 3 Thomas Schindl CLA 2010-07-16 10:33:17 EDT
Can you point me to the valdidation code so that I could use the logic there?
Comment 4 Paul Webster CLA 2010-07-16 10:36:27 EDT
org.eclipse.e4.ui.internal.workbench.E4CommandProcessor.createBinding(Context, ECommandService, EBindingService, MCommand, List<MParameter>, String, MKeyBinding) is the model to Binding code.

PW
Comment 5 Thomas Schindl CLA 2010-07-17 09:13:48 EDT
Paul, I've fixed this in HEAD. When running in the Live-Editor the model is NOT updated until a proper sequence is entered. In the none live case I show a warning but keep the model in sync with the UI.

I'll look into adding EMF-Validations before saving the complete model hopefully in the next days.