Community
Participate
Working Groups
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())
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...
Created attachment 18345 [details] Document describing search engine behavior while searching generic or parameterized methods
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
Created attachment 18347 [details] New version for document search engine behavior
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.
Verified in I20050330-0500