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

Bug 311440

Summary: [discovery] FilteredViewer should handle TraverseEvent SWT.TRAVERSE_RETURN from search widget
Product: [Eclipse Project] Equinox Reporter: David Green <greensopinion>
Component: p2Assignee: Steffen Pingel <steffen.pingel>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: shawn.minto
Version: unspecifiedFlags: shawn.minto: review+
Target Milestone: 3.6 RC1   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 304629    
Attachments:
Description Flags
mylyn/context/zip
none
adds traverse listener none

Description David Green CLA 2010-05-03 17:16:47 EDT
Pressing enter in the search text widget causes the *Next* button to be pressed on the discovery wizard.  Intuitively I expect for enter to cause a search to occur instead.  

This can be resolved by adding a TraverseListener to the search text widget, reacting to events with @e.keyCode == SWT.TRAVERSE_RETURN@ and setting @e.doit = false@.  The listener should also call @filterTextChanged()@
Comment 1 David Green CLA 2010-05-03 17:17:29 EDT
Created attachment 166870 [details]
mylyn/context/zip
Comment 2 Steffen Pingel CLA 2010-05-10 18:27:57 EDT
Created attachment 167839 [details]
adds traverse listener
Comment 3 Steffen Pingel CLA 2010-05-10 18:33:27 EDT
The patch adds a traverse listener to handle the enter key if the discovery viewer is not in automatic search mode. David, please check if that fixes the described problem.
Comment 4 David Green CLA 2010-05-10 20:13:51 EDT
The patch is great. +1
Comment 5 Shawn Minto CLA 2010-05-10 23:10:14 EDT
The patch looks good to me and having the ability to press enter in the search field seems very important for usability.
Comment 6 Steffen Pingel CLA 2010-05-11 03:25:11 EDT
Thanks. Released.