| Summary: | Ctrl+Backspace on Quick Access box doesn't work if editor active | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Nobody - feel free to take it <nobody> |
| Component: | SWT | Assignee: | Xi Yan <xixiyan> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | mistria |
| Version: | 4.8 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| See Also: |
https://bugs.eclipse.org/bugs/show_bug.cgi?id=346390 https://bugs.eclipse.org/bugs/show_bug.cgi?id=500818 |
||
| Whiteboard: | |||
|
Description
Nobody - feel free to take it
The issue here is that the command for deleting a word in the text editor is bind to Ctrl+Backspace. The key bindings overwrites any default shortcut for the SWT widgets. To see this: 1) Open Preferences->General->Keys, search for Delete Previous Word command 2) Unbind the command 3) Open with a file generic text editor (not a java editor) 3) Now word deletion with Ctrl+Backspace should work as expected However, unbinding the command also prevents us from deleting a word using Ctrl+Backspace in the Java editor because the ST.DELETE_PREVIOUS_WORD action is handled by JDT instead of the default handler in StyledText. See org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.createNavigationActions(CompilationUnitEditor.java:1846) where the default StyledText handler was disabled. Ctrl+Backspace does not work with a java editor if the we unbind the command. The same issue happens with all key bindings, i.e. Ctrl++ when quick access box is in focus triggers zoom in, etc. One possible solution is a similar fix to bug 346390. 1) SWT need to have an API for Text to delete previous word 2) In org.eclipse.ui.internal.quickaccess.SearchField#hookUpSelectAll, override the Delete Previous Word command with a handler that executes the deletePreviousWord on txtQuickAccess explicitly This is similar to bug 500818 where I didn't manage to bind the F2 key to the Quick Access action only because the F2 from editor takes precedence. This has been fixed with the change of Ctrl+3 becoming dialog. |