Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 48028 - Package explorer listens for F5 directly
Summary: Package explorer listens for F5 directly
Status: RESOLVED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Dirk Baeumer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 43851
  Show dependency tree
 
Reported: 2003-12-03 15:58 EST by Douglas Pollock CLA
Modified: 2004-03-15 12:50 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Douglas Pollock CLA 2003-12-03 15:58:03 EST
The package explorer is listening explicity for the F5 key event.  With the new
key binding architecture, it is not recommended that individual views listen for
key events.  Instead, they should register handlers (actions) with one of the
global commands.  This allows the user to modify the key binding, if they wish.
 It also guarantees that your key binding will always be respected (i.e., not
clobbered by someone defining a key binding on a global command that "hides" yours).

The new key configuration provided in I20031202 binds F5 to "Refresh".  This
seems to trigger a refresh in the package explorer properly.  If this is not the
case, please register an appropriate handler for the package explorer view.

In either case, please stop attaching a key listener to the view.
Comment 1 Douglas Pollock CLA 2003-12-03 15:59:19 EST
This bug is related to Bug 47093.  It is also part of the work involved in Bug
43851.
Comment 2 Dirk Baeumer CLA 2003-12-04 06:40:01 EST
Classes in JDT/UI that reference SWT.F5

CallHierarchyViewPart.java
JavaBrowsingPart.java
TypeHierarchyViewPart.java
PackageExplorerActionGroup.java
HierarchyInformationControl.java

Douglas, the reason why we did this was that the debugger uses F5 in the "Old 
Eclipse Keybinding" and we had lots of requests F5 does a refresh. If we 
change this to use the keybinding service what will happen if users use 
the "old eclipse" key binding. Can you please comment on this.
Comment 3 Dirk Baeumer CLA 2003-12-16 14:09:30 EST
Ping ...
Comment 4 Douglas Pollock CLA 2003-12-16 14:23:13 EST
Sorry for not replying earlier, but I've been waiting to come up with a 
complete answer.  I'll give you what I have....

I have tested the scenario you described (both debug and jdt binding "F5" as a 
keyboard shortcut).  It works for me.  However, in speaking with Chris, it is 
not clear that this is necessarily true in all situations.  I haven't had a 
chance yet to test more thoroughly, so I'm loathe to recommend anything at 
this point.
Comment 5 Douglas Pollock CLA 2004-02-20 14:42:33 EST
I'm going to have to go back on this.  Or, at least, fixing this isn't 
strictly necessary. 
 
In the ideal world, both debug and package explorer should define a context, 
and in their individual contexts they should bind "F5".  "F5" shouldn't be 
bound in the global context.  However, we've found a way around the problem, 
which seems to work (i.e., unhandled commands don't eat keys). 
 
I'd recommend closing this bug for now.  Either "INVALID" or "LATER". 
Comment 6 Martin Aeschlimann CLA 2004-03-15 10:06:52 EST
dirk, do you want to suggest a retargable 'refresh' action? Close it if you don't.
Comment 7 Dirk Baeumer CLA 2004-03-15 12:50:35 EST
Markus, for your information.