Bug 492180 - [Quick Access] Allow to specify wildcards
Summary: [Quick Access] Allow to specify wildcards
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.4   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 4.7 M5   Edit
Assignee: Patrik Suzzi CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy
Depends on: 491389
Blocks:
  Show dependency tree
 
Reported: 2016-04-21 09:58 EDT by Lars Vogel CLA
Modified: 2017-02-28 12:10 EST (History)
2 users (show)

See Also:


Attachments
image: how it works with the proposed change (19.94 KB, image/png)
2016-12-20 06:14 EST, Patrik Suzzi CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Vogel CLA 2016-04-21 09:58:42 EDT
+++ This bug was initially created as a clone of Bug #491389 +++

Would be nice to search for wildcards, in Quick Access. For example "Create * Java".
Comment 1 Lars Vogel CLA 2016-04-21 10:06:53 EDT
Assigning to Patrik our "Quick Access" expert.
Comment 2 Patrik Suzzi CLA 2016-04-25 05:37:39 EDT
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);
}
Comment 3 Patrik Suzzi CLA 2016-12-16 07:30:31 EST
Bug 500661 contains a useful example on how we can use Patterns in QuickAccess searches
Comment 4 Patrik Suzzi CLA 2016-12-20 06:14:12 EST
Created attachment 265971 [details]
image: how it works with the proposed change

With the proposed change, wildcards are enabled.
Comment 5 Eclipse Genie CLA 2016-12-20 06:16:42 EST
New Gerrit change created: https://git.eclipse.org/r/87469
Comment 7 Eclipse Genie CLA 2016-12-20 17:32:31 EST
New Gerrit change created: https://git.eclipse.org/r/87509