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

Bug 41930

Summary: Key bindings don't work in Java editor
Product: [Eclipse Project] Platform Reporter: Dani Megert <daniel_megert>
Component: UIAssignee: Chris McLaren <csmclaren>
Status: VERIFIED FIXED QA Contact:
Severity: blocker    
Priority: P3 CC: eclipse, jcompagner, jfrantzius, markus.kell.r, mtim2000, pascal, trajano
Version: 3.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 41944    

Description Dani Megert CLA 2003-08-25 12:59:00 EDT
I20030825

1. Start fresh workspace
2. create Java project
3. create class Test
4. use a commands with Text editor or Java editor scope
==> they don't work

Examples:
Comment - Ctrl + /
Incremental Find - Ctrl + j

Note: Ctrl + j works in the text editor.
Comment 1 Chris McLaren CLA 2003-08-26 10:20:19 EDT
almost done..
Comment 2 Tom Hofmann CLA 2003-08-26 10:51:11 EDT
*** Bug 41976 has been marked as a duplicate of this bug. ***
Comment 3 Chris McLaren CLA 2003-08-26 12:01:01 EDT
fixed. the issue was that scopes (which are being phased out with the new 'contexts' api) currently no longer *automatically* follow the scope inheritance tree. i.e. java editor scope does not necessarily imply text editor scope. there is a use case (in debug) where we might need this. or we might not. (it is a case of A1 and A2 are children of A, and we'd like to set the contexts in the following order { A1, A2, A }. automatic inheritance would mean { A1, A, A2, A })

one fix would be to change the last line of of constructor to JavaEditor to:setKeyBindingScopes(new String[] { "org.eclipse.jdt.ui.javaEditorScope", "org.eclipse.ui.textEditorScope" });  //$NON-NLS-1$

i have added some temporary code to ensure contexts automatically imply their ancestors.

Comment 4 Dirk Baeumer CLA 2003-08-26 17:46:24 EDT
*** Bug 42016 has been marked as a duplicate of this bug. ***
Comment 5 Dani Megert CLA 2003-08-26 17:51:58 EDT
verified in I20030826-rebuild
Comment 6 Tom Hofmann CLA 2003-08-27 04:49:03 EDT
*** Bug 42077 has been marked as a duplicate of this bug. ***
Comment 7 Dani Megert CLA 2003-08-27 05:03:49 EDT
*** Bug 42081 has been marked as a duplicate of this bug. ***
Comment 8 Dani Megert CLA 2003-08-27 06:49:24 EDT
*** Bug 42088 has been marked as a duplicate of this bug. ***