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

Bug 47093

Summary: [KeyBindings] F5 (for refresh) doesn't work in the navigator view when selection a Java project
Product: [Eclipse Project] Platform Reporter: Olivier Thomann <Olivier_Thomann>
Component: UIAssignee: Douglas Pollock <douglas.pollock>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P1    
Version: 3.0   
Target Milestone: 3.0 M8   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Olivier Thomann CLA 2003-11-20 10:30:34 EST
Using 200311192030, I cannot refresh a java project from the navigator view by
pressing F5. It works in the Package Explorer.
This is pretty annoying.
Comment 1 Douglas Pollock CLA 2003-12-03 13:05:08 EST
Did this used to work?  Can you tell me what version F5 for refresh did work in
the navigator view....
Comment 2 Olivier Thomann CLA 2003-12-03 13:18:23 EST
It works perfectly fine in 2.1.2 or 2.0.2. I have not tested other builds, but 
I would say it works fine in 2.x.x builds.
Comment 3 Douglas Pollock CLA 2003-12-03 15:59:58 EST
Just to verify.  For me, this bug does not exist in I20031202 if I use the key
configuration called "Standard (3.0) - NEW!".  For now, I would recommend
switching to the new key configuration.  Hopefully, this will become the new
default soon.


However, the problem does occur with the current default key configuration. 
From the looks of things, a lot of views are binding "F5" directly, rather than
using any of the key binding architecture.  This is causing the problem. 
Essentially, there is cruft in some views that does not play nice with global,
user-definable key bindings.

Old sequence of events:
1.) Press F5
2.) No StepIntoActionDelegate is on the menu, and hence F5 is not bound
3.) Dispatch to the control
4.) PackageExplorer is listening for F5 and performs the refresh.

Current sequence of events:
1.) Press F5
2.) F5 is bound to StepIntoActionDelegate, which is defined but has no handler.
3.) The key binding architecture eats the event.

If you bind F5 to both Step Into and Refresh, then this works.  However, I think
that is more of a coincidence then reliable behaviour.

Even if we did make it so that the package explorer got the key event, it
shouldn't be processing key events on its own.  It defeats the purpose of
global, user-definable keyboard shortcuts.


I'm going to close this on the assumption that the new key configuration will be
 adopted.  If it is not, then I will re-open this bug at the end of M6.  In the
meantime, I have raised Bug 48028 to request that JDT UI stop using a key
listener to perform the refresh.
Comment 4 Douglas Pollock CLA 2003-12-17 09:41:45 EST
Moving the M7, so that I can double-check this again when I'm verifying the M7
build.
Comment 5 Douglas Pollock CLA 2004-02-12 09:50:43 EST
We are deferring changing the default key configuration.
Comment 6 Douglas Pollock CLA 2004-02-20 14:39:32 EST
This problem has been fixed in HEAD by changes to how the key binding service 
works.  If the command is not handled, then it does not eat the key. 
Comment 7 Douglas Pollock CLA 2004-03-25 13:24:56 EST
Verified in I200403250800 by switching to the resource perspective, selecting a 
project, and pressing "F5".  The refresh progress dialog opened.