Bug 80914 - [1.5][search] SearchPattern R_EQUIVALENT_MATCH matchRule does not work properly
Summary: [1.5][search] SearchPattern R_EQUIVALENT_MATCH matchRule does not work properly
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-12-14 05:46 EST by Frederic Fusier CLA
Modified: 2004-12-14 15:17 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frederic Fusier CLA 2004-12-14 05:46:36 EST
Using v_526.

It appears that specify R_EQUIVALENT_MATCH match rule for SearchPattern has no
effect. In fact search engine always works on this mode for generic types search
until R_ERASURE_MATCH is specified on search pattern.

So, searching List<Exception> without R_EQUIVALENT_MATCH match rule reports List
(raw type) and List<? extends Throwable> although it should not!
Comment 1 Frederic Fusier CLA 2004-12-14 07:25:58 EST
Fixed.

Now search engine handles R_EQUIVALENT_MATCH search pattern bit correctly.
Reminder: by default R_EQUIVALENT_MATCH and R_ERASURE bits are not set so only
perfect match will be reported. When R_EQUIVALENT_MATCH is set, it reports also
references which have an equivalent signature than pattern.
Also remind that R_ERASURE_MATCH overrides R_EQUIVALENT_MATCH bit and return all
references whose erasure matches the pattern (which obviously includes
equivalent signatures).

[jdt-core-internal]
Changes done in:
 - PatternLocator: add field isEquivalentMatch,
 - TypeReferenceLocator:
    -> #matchReportReference(Expression,IJavaElement,int,int,int,int,
        TypeBinding,MatchLocator)
    -> #matchReportImportRef(ImportReference,Binding,IJavaElement,int, 
        MatchLocator)
 - TypeReferencePattern: #typeParameterNames(IType)
Test cases added: class JavaSearchGenericTypeEquivalentTests
Comment 2 Olivier Thomann CLA 2004-12-14 15:17:57 EST
Verified in 200412140800