Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 84707 - [Preferences] search doesn't match with spaces.
Summary: [Preferences] search doesn't match with spaces.
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M6   Edit
Assignee: Tod Creasey CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 85513 85617 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-02-08 11:17 EST by DJ Houghton CLA
Modified: 2005-03-30 11:32 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description DJ Houghton CLA 2005-02-08 11:17:34 EST
We now search based on word rather than whole phrase for the preference dialog.

But that has broken the case where the word that you type in the search dialog
contains a space. For instance: "code tem" doesn't match "Code Templates".
Comment 1 DJ Houghton CLA 2005-02-15 17:28:39 EST
Fix is to add code to FilteredPreferenceDialog#createTreeViewer. 

The first block of code already exists and checks for a match by splitting the
search widget's text field based on space. 

The second block of code is new and basically says if we had a phrase with a
space in it, then try and do a match on the whole phrase. (which would match,
for instance, "code templates")

------------------

String[] words = node.getLabelText().split("\\W"); //$NON-NLS-1$
for (int i = 0;  i < words.length; i++){
	if( match(words[i]))
		return true;
}
-> // if the text contained spaces, we already tried matching on each individual
-> // word but now try and match on the whole phrase.
-> if (words.length > 1 && match(node.getLabelText())) 
-> 	return true;

----------------

Re-assigning to Tod for review/release.
Comment 2 Kim Horne CLA 2005-02-16 14:02:15 EST
*** Bug 85513 has been marked as a duplicate of this bug. ***
Comment 3 Kim Horne CLA 2005-02-16 19:37:20 EST
*** Bug 85617 has been marked as a duplicate of this bug. ***
Comment 4 Tod Creasey CLA 2005-02-22 14:07:39 EST
Fixed in build >20050222
Comment 5 Tod Creasey CLA 2005-03-30 11:32:13 EST
Verified in 20050330