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

Bug 90656

Summary: [EditorMgmt] NPE in EditorManager.reuseEditor
Product: [Eclipse Project] Platform Reporter: Nick Edgar <n.a.edgar>
Component: UIAssignee: Stefan Xenos <sxenos>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: sxenos
Version: 3.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Nick Edgar CLA 2005-04-07 12:48:06 EDT
build I20050405

- reuse editors toggled on (with default number of 8)
- in a Java editor, use F3 on a method call expression
- got the generic "The command for the key you pressed failed" dialog
- log has:

!ENTRY org.eclipse.ui 4 4 2005-04-07 12:43:07.744
!MESSAGE The command for the key you pressed failed

!ENTRY org.eclipse.ui 4 0 2005-04-07 12:43:07.744
!MESSAGE The command for the key you pressed failed
!STACK 0
java.lang.NullPointerException
	at
org.eclipse.ui.internal.EditorManager.reuseInternalEditor(EditorManager.java:900)
	at
org.eclipse.ui.internal.EditorManager.openEditorFromDescriptor(EditorManager.java:671)
	at org.eclipse.ui.internal.EditorManager.openEditor(EditorManager.java:660)
	at
org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2254)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2183)
	at org.eclipse.ui.internal.WorkbenchPage.access$8(WorkbenchPage.java:2175)
	at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2161)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2156)
	at org.eclipse.ui.ide.IDE.openEditor(IDE.java:371)
	at org.eclipse.ui.ide.IDE.openEditor(IDE.java:334)
	at
org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:231)
	at
org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:129)
	at org.eclipse.jdt.internal.ui.actions.OpenActionUtil.open(OpenActionUtil.java:49)
	at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:164)
	at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:138)
	at
org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:216)
	at
org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:188)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:996)
	at org.eclipse.ui.commands.ActionHandler.execute(ActionHandler.java:182)
	at
org.eclipse.ui.internal.handlers.LegacyHandlerWrapper.execute(LegacyHandlerWrapper.java:108)
	at org.eclipse.core.commands.Command.execute(Command.java:331)
	at
org.eclipse.core.commands.ParameterizedCommand.execute(ParameterizedCommand.java:396)
	at
org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand(WorkbenchKeyboard.java:452)
	at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java:741)
	at
org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java:784)
	at
org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings(WorkbenchKeyboard.java:543)
	at
org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3(WorkbenchKeyboard.java:486)
	at
org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter.handleEvent(WorkbenchKeyboard.java:110)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
	at org.eclipse.swt.widgets.Display.filterEvent(Display.java:777)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:841)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:866)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:851)
	at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:879)
	at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:875)
	at org.eclipse.swt.widgets.Widget.wmKeyDown(Widget.java:1454)
	at org.eclipse.swt.widgets.Control.WM_KEYDOWN(Control.java:3338)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:3058)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:3466)
	at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
	at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1628)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2525)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1570)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1534)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:306)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
	at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103)
	at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:228)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:156)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
	at java.lang.reflect.Method.invoke(Method.java:391)
	at org.eclipse.core.launcher.Main.invokeFramework(Main.java:315)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:268)
	at org.eclipse.core.launcher.Main.run(Main.java:947)
	at org.eclipse.core.launcher.Main.main(Main.java:931)
Comment 1 Nick Edgar CLA 2005-04-07 12:52:08 EDT
This is most likely a result of the editors being left in a bad state due to bug
89246.  One of the stale editors does show up in the Ctrl+F6 list.

Comment 2 Stefan Xenos CLA 2005-04-07 18:49:18 EDT

*** This bug has been marked as a duplicate of 88119 ***