Summary: | [Quick Access] Allow to specify wildcards | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] Platform | Reporter: | Lars Vogel <Lars.Vogel> | ||||
Component: | UI | Assignee: | Patrik Suzzi <psuzzi> | ||||
Status: | RESOLVED FIXED | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P3 | CC: | Lars.Vogel, psuzzi | ||||
Version: | 4.4 | Keywords: | noteworthy | ||||
Target Milestone: | 4.7 M5 | ||||||
Hardware: | PC | ||||||
OS: | Linux | ||||||
See Also: |
https://git.eclipse.org/r/87469 https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=fc93698203951a827fedcc9de2e5bc84df156034 https://git.eclipse.org/r/87509 https://git.eclipse.org/c/www.eclipse.org/eclipse/news.git/commit/?id=f37a79599ef98d5ecea7cb880f3440a2578442d9 |
||||||
Whiteboard: | |||||||
Bug Depends on: | 491389 | ||||||
Bug Blocks: | |||||||
Attachments: |
|
Description
Lars Vogel
2016-04-21 09:58:42 EDT
Assigning to Patrik our "Quick Access" expert. My initial idea is to transform the filter with wildcards in regexp and use regexp for matching. if(!filter.contains("*") || !filter.contains("?")){ // prepend "\" to special chars: ([{\^-=$!|]}).+ String re = filter.replaceAll("[\\(\\[\\{\\\\\\^\\-\\=\\$\\!\\|\\]\\}\\)\\.\\+]", "\\$0"); // replace * wildcard with \S* ( re = re.replaceAll("\\*", "\\S*"); // replace ? wildcard with \S?+ re = re.replaceAll("\\?", "\\S?"); // return Pattern.compile(re); } Bug 500661 contains a useful example on how we can use Patterns in QuickAccess searches Created attachment 265971 [details]
image: how it works with the proposed change
With the proposed change, wildcards are enabled.
New Gerrit change created: https://git.eclipse.org/r/87469 Gerrit change https://git.eclipse.org/r/87469 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=fc93698203951a827fedcc9de2e5bc84df156034 New Gerrit change created: https://git.eclipse.org/r/87509 Gerrit change https://git.eclipse.org/r/87509 was merged to [master]. Commit: http://git.eclipse.org/c/www.eclipse.org/eclipse/news.git/commit/?id=f37a79599ef98d5ecea7cb880f3440a2578442d9 |