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

Bug 336603

Summary: [open type] '*' does not glob correctly in the Open Type dialog
Product: [Eclipse Project] JDT Reporter: erik.wikstrom
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, remy.suen
Version: 3.6.1   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Picture showing that '*' works none

Description erik.wikstrom CLA 2011-02-08 06:33:25 EST
Build Identifier: 20100917-0705

I use the Open Type (Ctrl + Shift + T) feature to find functions etc. in my projects, but since I often don't know the exact name I use globing (wildcards) when searching. The problem is that the '*' (asterisk) does not glob correctly. For example I have a function called "CalculateTotalVolume", but when I type "*total*volume*" I don't see it.

Eclipse is clearly interpreting the asterisk as "one or more characters" while convention is to interpret it as "zero or more characters" (see "man 7 glob", or regex).

This makes it very hard to find functions etc. when you are not sure of the name but know some parts of it, since it you place an asterisk at the wrong place you will not find it.

Reproducible: Always

Steps to Reproduce:
1. Copy the name of a function/class/enum/whatever in a project
2. Press Ctrl + Shift + T to bring up the Open Type dialog
3. Paste the name into the text-box
4. Insert an asterisk somewhere in the name
5. Notice that the name is no longer among the matching elements
Comment 1 Dani Megert CLA 2011-02-08 07:57:48 EST
This works fine for me using http://download.eclipse.org/eclipse/downloads/drops/R-3.6.1-201009090800/index.php. Not sure what download and/or add-ons you're using but out of the box 'Open Type' does not find functions but only types.

If you still see this, please provide more detailed/exact steps to reproduce.
Comment 2 Dani Megert CLA 2011-02-08 07:59:16 EST
Created attachment 188511 [details]
Picture showing that '*' works