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

Bug 318045

Summary: [patch] allow whitspaces as search characters in tasklist find
Product: z_Archived Reporter: Thomas Ehrnhoefer <thomas.ehrnhoefer>
Component: MylynAssignee: Project Inbox <mylyn-triaged>
Status: CLOSED MOVED QA Contact:
Severity: enhancement    
Priority: P3 CC: b.muskalla, steffen.pingel, thomas.ehrnhoefer
Version: unspecifiedKeywords: helpwanted
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 211011    
Attachments:
Description Flags
patch
thomas.ehrnhoefer: review?
mylyn/context/zip
none
patch v2
thomas.ehrnhoefer: review?
mylyn/context/zip none

Description Thomas Ehrnhoefer CLA 2010-06-25 16:49:43 EDT
Occasionally white spaces might be valid search characters (e.g. if I am searching for the word "is" but don't want "wise" to show up). Currently leading and trailing whitespaces are trimmed.

An easy fix would be to either support quotes to specify a phrase to look for, or a placeholder for a whitespace (e.g. %s)
This task could be escalated to something bigger though, to support richer search capabilities (AND/OR/phrases and even restrictions on fields to search in maybe, see task 270901). Not sure if just adding a fix for the whitspace issue here would be the best way, maybe it should be done "right" right away
Comment 1 Thomas Ehrnhoefer CLA 2010-06-25 18:31:17 EDT
Created attachment 172824 [details]
patch

another approach which would work for me - a preference to not trim the search text.
not sure if that is acceptable though
Comment 2 Thomas Ehrnhoefer CLA 2010-06-25 18:31:19 EDT
Created attachment 172825 [details]
mylyn/context/zip
Comment 3 Steffen Pingel CLA 2010-10-25 12:46:45 EDT
I like the suggestion of supporting quotes in the find field. This is very similar to how search engines and some repositories support searching for phrases. I would rather avoid adding a preference for this as most users won't ever change the default and in a lot of cases trimming of white spaces is desired, e.g. when pasting from the clipboard. 

A patch to support that would be very welcome. I don't see a straight forward way to add this as StringMatcher does not have built-in support for quotes but there might be other ways to do this.
Comment 4 Thomas Ehrnhoefer CLA 2010-11-04 14:42:38 EDT
Created attachment 182409 [details]
patch v2

Here is a simple try using quotes (and also being able to escape them). Only supports quotes around the whole search string, not a mix of quoted and unquoted.
Seems to work fine in the tests, but a little odd behaviour in the task list. What is the filtered tree searching in, just the summary? It seems sometimes I try a " string" search and some, but not all of the tasks with [string] in the beginning get filtered out.
Comment 5 Thomas Ehrnhoefer CLA 2010-11-04 14:42:40 EDT
Created attachment 182410 [details]
mylyn/context/zip
Comment 6 Eclipse Webmaster CLA 2022-11-15 11:45:08 EST
Mylyn has been restructured, and our issue tracking has moved to GitHub [1].

We are closing ~14K Bugzilla issues to give the new team a fresh start. If you feel that this issue is still relevant, please create a new one on GitHub.

[1] https://github.com/orgs/eclipse-mylyn