Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 311440 - [discovery] FilteredViewer should handle TraverseEvent SWT.TRAVERSE_RETURN from search widget
Summary: [discovery] FilteredViewer should handle TraverseEvent SWT.TRAVERSE_RETURN fr...
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.6 RC1   Edit
Assignee: Steffen Pingel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 304629
  Show dependency tree
 
Reported: 2010-05-03 17:16 EDT by David Green CLA
Modified: 2010-05-11 03:25 EDT (History)
1 user (show)

See Also:
shawn.minto: review+


Attachments
mylyn/context/zip (1.85 KB, application/octet-stream)
2010-05-03 17:17 EDT, David Green CLA
no flags Details
adds traverse listener (1.03 KB, patch)
2010-05-10 18:27 EDT, Steffen Pingel CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.