Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 323424 - [Compatibility] Active editor tracking goes wrong with multiple workbench windows
Summary: [Compatibility] Active editor tracking goes wrong with multiple workbench win...
Status: VERIFIED FIXED
Alias: None
Product: e4
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 1.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.1 M2   Edit
Assignee: Remy Suen CLA
QA Contact: Remy Suen CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-23 14:26 EDT by Remy Suen CLA
Modified: 2011-11-15 14:20 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Remy Suen CLA 2010-08-23 14:26:01 EDT
1. Open an editor.
2. Window > New Window
3. Open an editor in the new window.
4. Ctrl+W
5. Switch back to the first window
6. Ctrl+W
7. No good.

org.eclipse.core.commands.ExecutionException: No activeEditor found while executing org.eclipse.ui.file.close
	at org.eclipse.ui.handlers.HandlerUtil.noVariableFound(HandlerUtil.java:40)
	at org.eclipse.ui.handlers.HandlerUtil.getVariableChecked(HandlerUtil.java:89)
	at org.eclipse.ui.handlers.HandlerUtil.getActiveEditorChecked(HandlerUtil.java:245)
	at org.eclipse.ui.internal.CloseEditorHandler.execute(CloseEditorHandler.java:46)
	at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
	at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:56)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:618)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:52)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:208)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:185)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:101)
	at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:135)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.executeCommand(KeyBindingDispatcher.java:266)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.press(KeyBindingDispatcher.java:465)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.processKeyEvent(KeyBindingDispatcher.java:515)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.filterKeySequenceBindings(KeyBindingDispatcher.java:348)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.access$0(KeyBindingDispatcher.java:294)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher$KeyDownFilter.handleEvent(KeyBindingDispatcher.java:76)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1253)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1052)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
	at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1103)
	at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1099)
	at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1508)
	at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:4268)
	at org.eclipse.swt.widgets.Canvas.WM_CHAR(Canvas.java:345)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4160)
	at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4873)
	at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
	at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2459)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3655)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:724)
Comment 1 Remy Suen CLA 2010-08-24 08:58:58 EDT
Fixed in CVS HEAD. There is still the problem where Ctrl+W is always active (even if there are no editors) but that is a separate issue.
Comment 2 Remy Suen CLA 2010-09-14 12:05:00 EDT
Verified with I20100914-1023 on Windows XP.
Comment 3 Oleg Besedin CLA 2011-11-15 14:20:08 EST
The ActiveWorkbenchWindowQueryContextFunction is no longer ncessary and might produce incorrect results is requested on non-application context. 

http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=d88527b505ef9486df93cbd8d9088745f248f57c