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

Bug 312259

Summary: Keybindings are being sent to the wrong place
Product: [Eclipse Project] e4 Reporter: Remy Suen <remy.suen>
Component: UIAssignee: Project Inbox <e4.ui-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: blocker    
Priority: P3 CC: ob1.eclipse
Version: 1.0   
Target Milestone: 1.0 M6   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Workaround - not meant to be applied
none
Patch none

Description Remy Suen CLA 2010-05-10 10:11:50 EDT
The 4.0 I20100507-1253 SDK is unusable.
http://download.eclipse.org/e4/sdk/drops/I20100507-1253/index.php

The keybindings seem to be sent exclusively either to an editor or a view so if you try to delete some text you might end up deleting a file.

At the moment, I believe it is caused by attachment 167232 [details] from bug 310839 comment 12 though that is not necessarily an indication of the context code being bad, it could be something in the handlers or the 4.0 workbench implementation.
Comment 1 Oleg Besedin CLA 2010-05-10 12:00:23 EDT
Created attachment 167739 [details]
Workaround - not meant to be applied

Here is the temporary change to EclipseContext that fixes the problem.
Comment 2 Oleg Besedin CLA 2010-05-10 14:08:31 EDT
(In reply to comment #1)
> Here is the temporary change to EclipseContext that fixes the problem.
Hmm... Nope, only works for the first editor. If a second editor is opened, the "DEL" keybinding tries to remove field/method.
Comment 3 Oleg Besedin CLA 2010-05-10 16:29:52 EDT
Created attachment 167813 [details]
Patch

The problem seem to be caused by incorrect information set in ISources for the active part's name.

The evaluation of handles for things like "DEL" and "Copy" trigered LegacyEditorActionBarExpression#evaluate() which expected active editor's id:

  org.eclipse.jdt.ui.CompilationUnitEditor 

but was getting instead:

  org.eclipse.e4.ui.compatibility.editor
Comment 4 Oleg Besedin CLA 2010-05-10 16:31:36 EDT
Patch appleid to CVS Head.