Bug 81377

Summary: [1.5][search] Semantics of search for methods with generics
Product: [Eclipse Project] JDT Reporter: Markus Keller <markus.kell.r>
Component: CoreAssignee: Frederic Fusier <frederic_fusier>
Status: VERIFIED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: dirk_baeumer, philippe_mulet
Version: 3.1   
Target Milestone: 3.1 M6   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Document describing search engine behavior while searching generic or parameterized methods
none
New version for document search engine behavior none

Description Markus Keller CLA 2004-12-16 06:04:04 EST
This bug is meant to foster a discussion about the meaning of matchRules
R_ERASURE_MATCH and R_EQUIVALENT_MATCH when searching for generic methods.

I currently see three cases that need to be defined:

(1) Search for references to parameterized methods:
Declaration: <T> void foo(T t);
References: foo("Eclipse"), foo(new Integer(1))

(2) Search for references to method in parameterized type, where signature
contains the type's type parameter:
Declaration: interface List<E> ... { ... boolean add(E o); ... }
References:
- new ArrayList<String>.add("Eclipse")
- new ArrayList.add("Eclipse")
- new ArrayList.add(new Object())
- class StringList extends ArrayList<String> {
      public boolean add(String s) {..}
  }
  ... and client: new StringList.add("Eclipse");

(3) Search for references to method with generic parameter type:
Declarations: foo(List l), foo(List<String> l)
References: foo(new ArrayList<String>()), foo(new ArrayList())
Comment 1 Frederic Fusier CLA 2004-12-16 06:24:02 EST
ok with this three cases, but I would have named them:
1) Search for generic methods (ie. methods with type parameters)
2) Search for methods with type parameter arguments
3) Search for methods with parameterized type arguments

I don't know yet if additional cases 4)=1)+2) and 5)=1)+3) are specific or
already treated by previous ones...
Comment 2 Frederic Fusier CLA 2005-02-27 17:57:55 EST
Created attachment 18345 [details]
Document describing search engine behavior while searching generic or parameterized methods
Comment 3 Frederic Fusier CLA 2005-02-27 18:00:24 EST
Fixed.

I've attached document which describes this behavior and have to figure out how
to document it in eclipse...

[jdt-core-internal]
No new test case added. Only modify existing ones
(JavaSearchGenericMethod*Tests) to match described behavior
Comment 4 Frederic Fusier CLA 2005-02-27 18:20:19 EST
Created attachment 18347 [details]
New version for document search engine behavior
Comment 5 Markus Keller CLA 2005-03-02 03:55:51 EST
Case (2) is not implemented/documented yet, but that's the subject of bug 79990,
I think. The examples in case (2) also don't work because of bug 86293.
Comment 6 David Audel CLA 2005-03-31 11:20:33 EST
Verified in I20050330-0500