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

Bug 328496

Summary: [Compatibility] Ctrl+W does not find opened editor if it wasn't requested to become the active part
Product: [Eclipse Project] e4 Reporter: Remy Suen <remy.suen>
Component: UIAssignee: Remy Suen <remy.suen>
Status: VERIFIED FIXED QA Contact: Remy Suen <remy.suen>
Severity: normal    
Priority: P3    
Version: 1.0   
Target Milestone: 4.1 M5   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
WorkbenchPage patch v1 none

Description Remy Suen CLA 2010-10-22 12:19:35 EDT
1. Close all editors if any are open.
2. Invoke Alt+Shift+F1 on a view.
3. Select the class.
4. An editor is opened.
5. Ctrl+W
6. Nothing happens.

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:58)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Comment 1 Remy Suen CLA 2010-10-22 12:27:48 EDT
Seems to also happen if you restart with opened editors and not actually activate any of them. If you try to invoke Ctrl+W nothing will happen.
Comment 2 Remy Suen CLA 2011-01-11 16:29:39 EST
Created attachment 186568 [details]
WorkbenchPage patch v1

Add code to update the active editor sources when an editor has been opened regardless of whether it should be activated or not.
Comment 3 Remy Suen CLA 2011-01-11 16:30:55 EST
(In reply to comment #2)
> Created attachment 186568 [details]
> WorkbenchPage patch v1

Fix released to CVS HEAD. The problem described in comment 1 will be fixed when bug 328703 and/or bug 329458 is fixed.
Comment 4 Remy Suen CLA 2011-01-26 08:03:55 EST
Verified with I20110125-2200 on Windows XP.