Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 331694 - [Compatibility] Some keybindings are not working in I20101202-0915
Summary: [Compatibility] Some keybindings are not working in I20101202-0915
Status: RESOLVED FIXED
Alias: None
Product: e4
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 1.0   Edit
Hardware: PC Windows XP
: P3 critical (vote)
Target Milestone: 4.1 M4   Edit
Assignee: Paul Webster CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-02 11:46 EST by Remy Suen CLA
Modified: 2010-12-02 15:35 EST (History)
0 users

See Also:


Attachments
org.eclipse.ui.workbench.prefs (2.24 KB, text/plain)
2010-12-02 12:47 EST, Remy Suen CLA
no flags Details
deltas.xml (915 bytes, text/plain)
2010-12-02 13:49 EST, Remy Suen CLA
no flags Details
Don't ask for the view registry v01 (2.00 KB, patch)
2010-12-02 14:51 EST, Paul Webster CLA
no flags Details | Diff
Don't throw away duplicate binding tables v01 (12.20 KB, patch)
2010-12-02 15:35 EST, Paul Webster CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Remy Suen CLA 2010-12-02 11:46:02 EST
If I start I20101202-0915 on a workspace created with an older 4.1 build without deleting the deltas, I don't get keybindings. If I delete the deltas, they work.

However, deleting the deltas does _not_ work on my main development workspace.
Comment 1 Remy Suen CLA 2010-12-02 12:47:27 EST
Created attachment 184373 [details]
org.eclipse.ui.workbench.prefs

This bug is caused by customized keybinding preferences lingering over from 3.x. That is, if you have a 3.x workspace, have changed some keybindings, and tried to start it up with I20101202-0915, you will see the problem.

To reproduce the problem, you can download the attachment and place it in your workspace's .metadata/.plugins/org.eclipse.core.runtime/.settings/ folder.
Comment 2 Remy Suen CLA 2010-12-02 12:49:53 EST
Note that there may be a second problem though of opening an older 4.1 workspace with I20101202-0915 because the keybindings are missing in that instant but return if the deltas.xml is deleted.
Comment 3 Paul Webster CLA 2010-12-02 12:55:13 EST
The order of operations for the commands/bindings is /org.eclipse.ui.workbench/plugin.xml:

org.eclipse.ui.internal.CommandToModelProcessor
org.eclipse.ui.internal.ContextToModelProcessor
org.eclipse.ui.internal.BindingToModelProcessor

these processors fill in the model with commands and keybindings scraped from the 3.x extension points.

Then from /org.eclipse.platform/LegacyIDE.e4xmi:

1) Set up the services
org.eclipse.e4.core.commands.CommandServiceAddon
org.eclipse.e4.ui.services.ContextServiceAddon
org.eclipse.e4.ui.bindings.BindingServiceAddon

2) fill in the services from the model
org.eclipse.e4.ui.internal.workbench.addons.CommandProcessingAddon
org.eclipse.e4.ui.internal.workbench.addons.ContextProcessingAddon
org.eclipse.e4.ui.workbench.swt.util.BindingProcessingAddon

PW
Comment 4 Remy Suen CLA 2010-12-02 12:59:26 EST
(In reply to comment #2)
> Note that there may be a second problem though of opening an older 4.1
> workspace with I20101202-0915 because the keybindings are missing in that
> instant but return if the deltas.xml is deleted.

1. Start I20101126-1155 on a new workspace.
2. Ctrl+Shift+R opens a dialog.
3. File > Exit
4. Start I20101202-0915 on the same workspace.
5. Ctrl+Shift+R does not work.
6. File > Exit
7. Delete the workspace's deltas.xml file.
8. Repeat steps 4 and 5. Ctrl+Shift+R is working now.

So this definitely seems like a different problem.
Comment 5 Remy Suen CLA 2010-12-02 13:49:05 EST
Created attachment 184379 [details]
deltas.xml

The attached deltas.xml file will reproduce the problem described by comment 4.
Comment 6 Paul Webster CLA 2010-12-02 14:39:21 EST
Problem with 3.x key preferences

!ENTRY org.eclipse.e4.ui.workbench 2 0 2010-12-02 14:34:30.217
!MESSAGE Could not run processor
!STACK 0
org.eclipse.e4.core.di.InjectionException: java.lang.IllegalStateException: Workbench has not been created yet.
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:59)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:226)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:196)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:86)
	at org.eclipse.e4.ui.internal.workbench.ModelAssembler.runProcessor(ModelAssembler.java:219)
	at org.eclipse.e4.ui.internal.workbench.ModelAssembler.processModel(ModelAssembler.java:87)
	at org.eclipse.e4.ui.internal.workbench.ResourceHandler.loadMostRecentModel(ResourceHandler.java:233)
	at org.eclipse.e4.ui.internal.workbench.swt.E4Application.loadApplicationModel(E4Application.java:323)
	at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createE4Workbench(E4Application.java:191)
	at org.eclipse.ui.internal.Workbench$3.run(Workbench.java:523)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:516)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:600)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
Caused by: java.lang.IllegalStateException: Workbench has not been created yet.
	at org.eclipse.ui.PlatformUI.getWorkbench(PlatformUI.java:92)
	at org.eclipse.ui.internal.keys.BindingPersistence.readBindingsFromPreferences(BindingPersistence.java:486)
	at org.eclipse.ui.internal.keys.BindingPersistence.reRead(BindingPersistence.java:1395)
	at org.eclipse.ui.internal.keys.BindingPersistence.read(BindingPersistence.java:1294)
	at org.eclipse.ui.internal.BindingToModelProcessor.process(BindingToModelProcessor.java:60)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:600)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:52)
	... 26 more
Comment 7 Paul Webster CLA 2010-12-02 14:51:06 EST
Created attachment 184391 [details]
Don't ask for the view registry v01

Don't ask for the view registry before the workbench is initialized.

PW
Comment 8 Paul Webster CLA 2010-12-02 15:35:03 EST
Created attachment 184397 [details]
Don't throw away duplicate binding tables v01

Released to HEAD
PW
Comment 9 Paul Webster CLA 2010-12-02 15:35:43 EST
Released for tonight's build.
PW