Bug 53072 - [DOC] Search for fully qualified constructor name reports nothing
Summary: [DOC] Search for fully qualified constructor name reports nothing
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: 3.0 RC2   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-25 11:22 EST by Markus Keller CLA
Modified: 2004-06-11 10:10 EDT (History)
0 users

See Also:


Attachments
Proposed patch (1.66 KB, patch)
2004-06-03 09:56 EDT, Jerome Lanneluc CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2004-02-25 11:22:31 EST
Search for fully qualified constructor name reports nothing

Steps:
- open type org.eclipse.jdt.ui.actions.CCPActionGroup
- select CCPActionGroup(IViewPart)
- Search > Search...
-> search for references to constructor in workspace is fine

- again, but change search string to "org.eclipse.jdt.ui.actions.CCPActionGroup"
-> nothing found (expected: finds references to other constructors as well)

- again, but change search string to "CCPActionGroup"
-> fine: finds references to all constructors
Comment 1 Markus Keller CLA 2004-03-01 04:28:01 EST
Oops, the original bug description was inexact.

When searching for references to methods, I can just omit the parenthesis and
search finds references to all (overloaded) methods with that name.

Doing the same when searching for constructors fails: searching for references
to constructor "org.eclipse.jdt.ui.actions.CCPActionGroup.CCPActionGroup" (note
the name of the constructor in addition to the name of the class) fails.
However, searching for "org.eclipse.jdt.ui.actions.CCPActionGroup" (only class
name) succeeds.

Both forms (with and without constructor name) should find the same references.
Comment 2 Thomas M??der CLA 2004-04-29 04:17:14 EDT
We are not interpreting the search string. Moving to CORE.
Comment 3 Jerome Lanneluc CLA 2004-05-13 11:50:47 EDT
Since the class simple name is always the same as the constructor name, you 
don't need to repeat it in the search string. In your case, searching for the 
constructor CCPActionGroup() you should use 
the "org.eclipse.jdt.ui.actions.CCPActionGroup()" search string as you 
noticed. 

We should document this.
Comment 4 Markus Keller CLA 2004-05-13 12:00:25 EDT
Yes, I know I don't have to repeat the name. But I'd like to be able to repeat
it and still find the results. IMO documenting this doesn't solve the problem,
since no user's gonna read that doc.

Search for references to all overloaded methods with a common name:
- select method
- Ctrl+H
- delete parameters and parentheses
- press Search

This pattern should work for constructors as well.
Comment 5 Jerome Lanneluc CLA 2004-05-13 12:07:13 EDT
We cannot support both. If you have the search string "a.b.c.d.d()", how do 
you know if it is the constructor d() in class d in package a.b.c, or if it is 
the constructor d() in class d in package a.b.c.d ?
Comment 6 Markus Keller CLA 2004-05-13 12:29:22 EDT
Hmm, I see. You could consider both as matching, but that would probaly raise
more problems than it solves. I can also live with an explaining doc.
Comment 7 Jerome Lanneluc CLA 2004-06-03 09:56:24 EDT
Created attachment 11532 [details]
Proposed patch
Comment 8 Jerome Lanneluc CLA 2004-06-07 13:20:59 EDT
Patch released.
Comment 9 Olivier Thomann CLA 2004-06-11 10:10:22 EDT
Verified that the doc is in place in 200406110010