Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 318045 - [patch] allow whitspaces as search characters in tasklist find
Summary: [patch] allow whitspaces as search characters in tasklist find
Status: CLOSED MOVED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks: 211011
  Show dependency tree
 
Reported: 2010-06-25 16:49 EDT by Thomas Ehrnhoefer CLA
Modified: 2010-11-26 10:53 EST (History)
3 users (show)

See Also:


Attachments
patch (9.86 KB, patch)
2010-06-25 18:31 EDT, Thomas Ehrnhoefer CLA
thomas.ehrnhoefer: review?
Details | Diff
mylyn/context/zip (14.64 KB, application/octet-stream)
2010-06-25 18:31 EDT, Thomas Ehrnhoefer CLA
no flags Details
patch v2 (4.74 KB, patch)
2010-11-04 14:42 EDT, Thomas Ehrnhoefer CLA
thomas.ehrnhoefer: review?
Details | Diff
mylyn/context/zip (64.48 KB, application/octet-stream)
2010-11-04 14:42 EDT, Thomas Ehrnhoefer CLA
no flags Details

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