Bug 153994 - [KeyBindings] Eclipse 3.2: Cannot modify key bindings
Summary: [KeyBindings] Eclipse 3.2: Cannot modify key bindings
Status: VERIFIED INVALID
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2006-08-15 20:20 EDT by Daniel Kirkdorffer CLA
Modified: 2009-08-30 02:11 EDT (History)
1 user (show)

See Also:


Attachments
This is what I see when I initially select the Key preference (45.90 KB, image/gif)
2006-08-17 14:43 EDT, Daniel Kirkdorffer CLA
no flags Details
This is my list of existing editable key bindings (33.38 KB, image/gif)
2006-08-17 14:46 EDT, Daniel Kirkdorffer CLA
no flags Details
This is what I see on the modify tab after selecting edit (20.96 KB, image/gif)
2006-08-17 14:47 EDT, Daniel Kirkdorffer CLA
no flags Details
Protect KeysPreferencePage from NPE v01 (1.01 KB, patch)
2006-08-17 15:48 EDT, 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 Daniel Kirkdorffer CLA 2006-08-15 20:20:59 EDT
Just installed Eclipse 3.2 Build id: M20060629-1905 and I cannot modify the key bindings. 

When I select to edit an existing key binding the modify tab doesn't show the assignments, or the key sequences. I cannot Add, Remove or Restore settings as those buttons never become active.
Comment 1 Paul Webster CLA 2006-08-17 07:51:20 EDT
An example of which keys?

ex: I go to the Keys preference page and select "Find Next" (category: Edit).  When I hit the Edit Button, it takes me to the modify tab.

I see the assignment under Command section and the assignment under the Key Sequence section.

Are there any errors in your error log?  <workspace>/.metadata/.log?  If there are, could you please attach the log as a text file.

PW
Comment 2 Daniel Kirkdorffer CLA 2006-08-17 14:38:37 EDT
Here is what the logs are telling me:

!SESSION 2006-08-17 11:36:39.673 -----------------------------------------------
eclipse.buildId=M20060629-1905
java.version=1.5.0_06
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments:  -os win32 -ws win32 -arch x86

!ENTRY org.eclipse.ui 4 4 2006-08-17 11:39:02.376
!MESSAGE Unhandled event loop exception

!ENTRY org.eclipse.ui 4 0 2006-08-17 11:39:02.392
!MESSAGE Argument cannot be null
!STACK 0
java.lang.IllegalArgumentException: Argument cannot be null
	at org.eclipse.swt.SWT.error(SWT.java:3358)
	at org.eclipse.swt.SWT.error(SWT.java:3297)
	at org.eclipse.swt.SWT.error(SWT.java:3268)
	at org.eclipse.swt.widgets.Widget.error(Widget.java:435)
	at org.eclipse.swt.widgets.TableItem.setText(TableItem.java:1093)
	at org.eclipse.ui.internal.keys.KeysPreferencePage.updateTableBindingsForCommand(KeysPreferencePage.java:2176)
	at org.eclipse.ui.internal.keys.KeysPreferencePage.update(KeysPreferencePage.java:1905)
	at org.eclipse.ui.internal.keys.KeysPreferencePage.update(KeysPreferencePage.java:1883)
	at org.eclipse.ui.internal.keys.KeysPreferencePage.editBinding(KeysPreferencePage.java:1139)
	at org.eclipse.ui.internal.keys.KeysPreferencePage.selectedTableKeyBindings(KeysPreferencePage.java:1509)
	at org.eclipse.ui.internal.keys.KeysPreferencePage.access$16(KeysPreferencePage.java:1504)
	at org.eclipse.ui.internal.keys.KeysPreferencePage$17.widgetDefaultSelected(KeysPreferencePage.java:984)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:97)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
	at org.eclipse.jface.window.Window.open(Window.java:796)
	at org.eclipse.ui.internal.OpenPreferencesAction.run(OpenPreferencesAction.java:65)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:499)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:539)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488)
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:400)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95)
	at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
	at org.eclipse.core.launcher.Main.run(Main.java:977)
	at org.eclipse.core.launcher.Main.main(Main.java:952)

Comment 3 Daniel Kirkdorffer CLA 2006-08-17 14:43:46 EDT
Created attachment 48117 [details]
This is what I see when I initially select the Key preference
Comment 4 Daniel Kirkdorffer CLA 2006-08-17 14:46:27 EDT
Created attachment 48118 [details]
This is my list of existing editable key bindings

Note: the blank "When" columns reflect a binding that applied to a plug-in that is no longer installed in 3.2 - it was in 3.1.  I am working off an existing 3.1 workspace.
Comment 5 Daniel Kirkdorffer CLA 2006-08-17 14:47:03 EDT
Created attachment 48120 [details]
This is what I see on the modify tab after selecting edit
Comment 6 Paul Webster CLA 2006-08-17 15:39:31 EDT
Thank you for the logs.

And now you cannot edit any keybindings? Or just the keybindings for the plugins that disappeared?

It appears we're not handling the missing plugins gracefully.

PW
Comment 7 Paul Webster CLA 2006-08-17 15:48:35 EDT
Created attachment 48133 [details]
Protect KeysPreferencePage from NPE v01

Everywhere else we check this map for null.

PW
Comment 8 Daniel Kirkdorffer CLA 2006-08-17 15:52:25 EDT
I can't edit any key bindings - and I must say that initial modify screen is very odd too.
Comment 9 Paul Webster CLA 2006-08-21 15:36:51 EDT
While I can protect against the NPE, your system is in a state where you have keybindings for contexts that don't exist.

Once the key sequence section looks for that binding to the non-existant context, it will generate "Context or command became undefined on a non-UI thread will the UI thread was processing." error messages.

The workaround is to start eclipse with a clean workspace, then import your projects (copied or not).

I've released the NPE fix into HEAD >20060821, and I'll probably back-port it to 3.2.1

PW
Comment 10 Paul Webster CLA 2006-08-22 16:39:14 EDT
Released NPE fix into 3.2.1 >20060822
PW
Comment 11 Daniel Kirkdorffer CLA 2006-08-22 17:21:14 EDT
Paul - can I assume however, that I can remove the bad bindings with the fix?
Comment 12 Paul Webster CLA 2006-09-28 15:18:11 EDT
Is this still a problem in 3.3?

PW
Comment 13 Daniel Kirkdorffer CLA 2006-09-28 21:26:07 EDT
I have not upgraded to 3.3.
Comment 14 Paul Webster CLA 2006-09-28 22:27:13 EDT
Yes, the patch is in HEAD as well.
Comment 15 Denis Roy CLA 2009-08-30 02:11:48 EDT
As of now 'LATER' and 'REMIND' resolutions are no longer supported.
Please reopen this bug if it is still valid for you.