Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 312259 - Keybindings are being sent to the wrong place
Summary: Keybindings are being sent to the wrong place
Status: RESOLVED FIXED
Alias: None
Product: e4
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 1.0   Edit
Hardware: PC Windows XP
: P3 blocker (vote)
Target Milestone: 1.0 M6   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-10 10:11 EDT by Remy Suen CLA
Modified: 2010-05-10 16:31 EDT (History)
1 user (show)

See Also:


Attachments
Workaround - not meant to be applied (1.62 KB, patch)
2010-05-10 12:00 EDT, Oleg Besedin CLA
no flags Details | Diff
Patch (1.39 KB, patch)
2010-05-10 16:29 EDT, Oleg Besedin CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.