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

Bug 395297

Summary: Find contribution class dialog does not support "*" at all
Product: [Eclipse Project] e4 Reporter: Levent Yildirim <lyildirim>
Component: ToolsAssignee: Project Inbox <e4.tools-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: jonah, koehler, Lars.Vogel, mail, marcel.bruch, nobody
Version: 0.12   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Proposed patch to support "*handler" search terms none

Description Levent Yildirim CLA 2012-11-28 10:05:31 EST
One * ist supported an lists all findable classes.
If you type more characters, the find list ist empty.

* should be supported in any case
Comment 1 Levent Yildirim CLA 2012-11-28 10:07:54 EST
Edit:
One * is supported and lists all findable classes.
If you type more characters, the find list ist empty.

* should be supported in any case
Comment 2 Marcel Bruch CLA 2012-11-28 10:10:11 EST
+1. Dialog should support "contains()" matches at least (with pure prefix matches ranked on top).
Comment 3 Lars Vogel CLA 2012-11-28 10:18:35 EST
That would be ContributionClassDialog from org.eclipse.e4.tools.emf.ui.

Patch for this would be nice. 

How to checkout the e4 tools code, is documented here: http://www.vogella.com/articles/Eclipse4Source/article.html#e4gitrepository
Comment 4 Marcel Bruch CLA 2012-11-28 13:51:39 EST
Created attachment 224077 [details]
Proposed patch to support "*handler" search terms

Are there any tests for org.eclipse.e4.tools.emf.editor3x projects somewhere?
Comment 5 Nobody - feel free to take it CLA 2012-11-28 14:11:30 EST
Pushed as http://git.eclipse.org/c/e4/org.eclipse.e4.tools.git/commit/?id=57492f7ea0ae9ead6cb0eb2341a7cb2fe8870292

Thank you Marcel.
Comment 6 Lars Vogel CLA 2012-11-29 02:46:02 EST
Thanks Marcel, looks really good. I think the current solution only works for wildcards at the beginning. We should enhance this to support general wildcard matching.
Comment 7 Lars Vogel CLA 2012-11-29 02:47:13 EST
Reopening
Comment 8 Marcel Bruch CLA 2012-11-29 02:51:03 EST
Thanks for applying the patch. While preparing the little patch, I thought that we may improve the general search behavior a bit:


A few scenarios I think that should work (some of them al):

org.| --> all classes with org in package prefix
org.*.Test| --> all classes with "org.*" + class name "Test*"
org.*.*test| --> as above but classname is "*test*"


To summarize, the selection dialog should behave like the "open type dialog" (it can do all that stuff above).
Comment 9 Lars Vogel CLA 2013-10-21 05:18:39 EDT
I think the current fix solves the original request. Marking as closed. If someone wants to work on an improved solution please open a new bug report.
Comment 10 Jonah Graham CLA 2015-12-29 06:56:52 EST
(In reply to Lars Vogel Unavailable until 04 Jan 2016 from comment #9)
> I think the current fix solves the original request. Marking as closed. If
> someone wants to work on an improved solution please open a new bug report.

An improvement may indeed be needed as depending on the scope there are now exceptions thrown. See new Bug 484969.