Bug 35874 - [Key Bindings] 'Ghost' key binding entries
Summary: [Key Bindings] 'Ghost' key binding entries
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Chris McLaren CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-31 13:23 EST by Jerry Pisk CLA
Modified: 2003-09-04 11:51 EDT (History)
0 users

See Also:


Attachments
Keys screenshot (20.93 KB, image/png)
2003-03-31 13:25 EST, Jerry Pisk CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jerry Pisk CLA 2003-03-31 13:23:28 EST
Eclipse has empty tree entries under Preferences -> Workbench -> Keys. Attached 
is a screenshot of the Keys preferences page. If one of those two entries is 
clicked the following exception is logged:

!ENTRY org.eclipse.jface 4 2 Mar 31, 2003 10:04:58.851
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.jface".
!STACK 0
java.lang.IllegalArgumentException: Argument cannot be null
	at org.eclipse.swt.SWT.error(SWT.java:2318)
	at org.eclipse.swt.SWT.error(SWT.java:2262)
	at org.eclipse.swt.widgets.Widget.error(Widget.java:385)
	at org.eclipse.swt.widgets.Text.setText(Text.java:1355)
	at org.eclipse.ui.internal.commands.KeyPreferencePage.update
(KeyPreferencePage.java:1140)
	at 
org.eclipse.ui.internal.commands.KeyPreferencePage.selectedComboKeySequence
(KeyPreferencePage.java:1032)
	at 
org.eclipse.ui.internal.commands.KeyPreferencePage.modifiedComboKeySequence
(KeyPreferencePage.java:1020)
	at org.eclipse.ui.internal.commands.KeyPreferencePage.access$8
(KeyPreferencePage.java:1019)
	at org.eclipse.ui.internal.commands.KeyPreferencePage$6.modifyText
(KeyPreferencePage.java:909)
	at org.eclipse.swt.widgets.TypedListener.handleEvent
(TypedListener.java:183)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:81)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:840)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:865)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:845)
	at org.eclipse.swt.widgets.Combo.setText(Combo.java:1196)
	at org.eclipse.ui.internal.commands.KeyPreferencePage.setKeySequence
(KeyPreferencePage.java:1554)
	at 
org.eclipse.ui.internal.commands.KeyPreferencePage.selectedTreeViewerCommands
(KeyPreferencePage.java:993)
	at org.eclipse.ui.internal.commands.KeyPreferencePage.access$5
(KeyPreferencePage.java:981)
	at org.eclipse.ui.internal.commands.KeyPreferencePage$3.selectionChanged
(KeyPreferencePage.java:876)
	at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:159)
	at org.eclipse.core.internal.runtime.InternalPlatform.run
(InternalPlatform.java:889)
	at org.eclipse.core.runtime.Platform.run(Platform.java:413)
	at org.eclipse.jface.viewers.Viewer.fireSelectionChanged
(Viewer.java:157)
	at org.eclipse.jface.viewers.StructuredViewer.updateSelection
(StructuredViewer.java:1290)
	at org.eclipse.jface.viewers.StructuredViewer.handleSelect
(StructuredViewer.java:657)
	at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected
(StructuredViewer.java:681)
	at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent
(OpenStrategy.java:178)
	at org.eclipse.jface.util.OpenStrategy.access$3(OpenStrategy.java:173)
	at org.eclipse.jface.util.OpenStrategy$1.handleEvent
(OpenStrategy.java:308)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:81)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:840)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1838)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1545)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:583)
	at org.eclipse.jface.window.Window.open(Window.java:563)
	at org.eclipse.ui.internal.OpenPreferencesAction.run
(OpenPreferencesAction.java:53)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:842)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection
(ActionContributionItem.java:456)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent
(ActionContributionItem.java:403)
	at org.eclipse.jface.action.ActionContributionItem.access$0
(ActionContributionItem.java:397)
	at 
org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent
(ActionContributionItem.java:72)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:81)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:840)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1838)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1545)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1402)
	at org.eclipse.ui.internal.Workbench.run(Workbench.java:1385)
	at org.eclipse.core.internal.boot.InternalBootLoader.run
(InternalBootLoader.java:845)
	at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:291)
	at org.eclipse.core.launcher.Main.run(Main.java:747)
	at org.eclipse.core.launcher.Main.main(Main.java:583)
Comment 1 Jerry Pisk CLA 2003-03-31 13:25:08 EST
Created attachment 4401 [details]
Keys screenshot
Comment 2 Nick Edgar CLA 2003-04-01 11:13:32 EST
Although we should not fail in this case, the commands shown in the screen shot 
are not contributed by the Eclipse SDK.
What product or other plugins are you running?
Also, please always indicate which Eclipse build you're running when entering 
problem reports.  This can be obtained via the Help > About dialog.
Comment 3 Jerry Pisk CLA 2003-04-01 13:10:59 EST
Running Eclipse 2.1 release, build 200303272130.

I also think this is caused by a plugin I'm running but I think Eclipse could 
be smart enough not to include empty strings in the Keys tree that will result 
in the exception being thrown. As for plugins I'm running: net.sf.colorer 
0.4.0, net.sf.solareclipse 0.3.1, net.sourceforge.phpeclipse 1.0.5 and 
org.vssplugin 1.4.0. It would really help if eclipse logged the offending 
plugin instead of throwing an exception.
Comment 4 Patrick Reinhart CLA 2003-04-09 08:58:44 EDT
I've got the same problem here, additional to that the key assignment 
[ctrl]-[space] is taken by one of the 'ghost' bindings. Strange enough that I 
got this happens on a fresh installation of eclipse also... (cleared all data 
and re-installed eclipse)
Comment 5 Kevin Clark CLA 2003-04-10 14:00:42 EDT
Receiving the same error. Same log dump and essentially the same screen shot. 
Out of the plug-ins originally listed in comment #3 I am running the VSS 1.4.0 
plug-in and the SolarEclipse 0.4.0 plug-in. It does seem like a 3rd party plug-
in problem, but I second the comments from Jerry.

My CTRL+Space is also malfunctioning (taken up by one of the nameless entries 
in Keys). Patrick, are you getting the error with just the Eclipse SDK (no 3rd 
Party plug-ins)?
Comment 6 Kevin Clark CLA 2003-04-10 14:19:47 EDT
More info for you. I just blew away my VSS 1.4.0 plug-in and that didn't clear 
up the problem. So I deleted the SolarEclipse plug-in. That did not resolve 
the situation either. It's quite possible that it is an Eclipse SDK bug.
Comment 7 Kevin Clark CLA 2003-04-14 13:08:14 EDT
Thanks to a Newsgroup post (found below) I know what is causing the problem 
and how to fix it. The problem is caused by the X-Men XML plug-in. But more 
specifically, any plug-in that defines an Accelerator Key tag (to CTRL+Space) 
in its plugin.xml file.

Newsgroup posting by Wald:

Do you happen to have the X-Men XML Editor plugin installed? 
AFAICT, that one caused the exact same problems on my Eclipse 
installation. The problem is, it defines Ctrl+Space as its own 
'code completion'-like key binding which interferes with the normal 
content assistant.

My solution: change the

<accelerator key="Ctrl+Space" 
id="org.xmen.content.assist.proposals" />

line in the "plugins.xml" file of the X-Men plugin to something 
else, for instance key="Ctrl+Alt+Space".

That solved the Content Assistant problem for me. The null items 
are also X-Men's fault, but I didn't look into that one yet.

-----------

I'm still gonna stick with Jerry's comments. Eclipse should not be so easily 
broken by 3rd party software. Thanks!
Comment 8 Chris McLaren CLA 2003-09-03 14:04:10 EDT
closing as fixed. preference page no longer throws exception, and key binding 
rules are unambiguous.