Bug 79790 - [1.5][search] Need to distinguish between raw and restricted search in the case of instantiated types
Summary: [1.5][search] Need to distinguish between raw and restricted search in the ca...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M4   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-30 12:09 EST by Dirk Baeumer CLA
Modified: 2004-12-14 15:17 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Baeumer CLA 2004-11-30 12:09:49 EST
I20041130

Code select now return a special IJavaElement when resolving code list List<String>.

If we hand such an element over to the search engine we need means to
distinguish between searches for List and searches for List<String>. One idea is
to add additional flags to SearchPattern.
Comment 1 Philipe Mulet CLA 2004-11-30 16:30:29 EST
Also the search match should persist the fact it was a strict match vs. a raw
match, for filtering at a later stage (think of filter in search result view).
Comment 2 Frederic Fusier CLA 2004-12-01 06:53:58 EST
I've open bug 79866 for comment 1 request...
Comment 3 Frederic Fusier CLA 2004-12-10 10:07:17 EST
Fixed.

SearchPattern now accepts a new flag for match rule: R_ERASURE_MATCH.
When this flag is set, search engine founds all types whose erasure matches the
given pattern erasure. By default search engine will only find exact or
compatible matches for generic or parameterized types.

Added new API method to make this flag settable even while creating pattern
using a IJavaElement: SearchPattern#createPattern(IJavaElement,int,int)

SearchMatch now has a rule field which shows the rule used while reporting the
match (see bug 79866 comment 1)

[jdt-core-internal]
I'll attached patches if someone is intererested in looking at changes...
New test class added: JavaSearchGenericTypeErasureTests
Note that JavaSearchGenericTypeTests has been fully rewritten due to the fact
that the output was completely modified with this new flag (display search match
compatibility and erasureness) .
Comment 4 Olivier Thomann CLA 2004-12-14 15:17:38 EST
Verified in 200412140800