Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 317576

Summary: [search] Call hierarchy doesn't show an usage for redefinition with instantiated type parameter
Product: [Eclipse Project] JDT Reporter: Axel Uhl <eclipse>
Component: CoreAssignee: Frederic Fusier <frederic_fusier>
Status: VERIFIED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: satyam.kandula
Version: 3.6   
Target Milestone: 3.8 M6   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Project flie to reproduce the problem none

Description Axel Uhl CLA 2010-06-22 09:21:18 EDT
Build Identifier: 20100610-0636

Consider the following declarations:

public abstract class Sup<C> {
	protected void m(C classifier) {
	}

	public void use(C owner) {
		m(owner);
	}
}

and

public class Sub extends Sup<String> {
	@Override
	protected void m(String classifier) {
	}
}

Position on Sub.m and show caller hierarchy. Sup.use is not displayed. Position on Sup.m and show caller hierarchy, and Sup.use is displayed. Sub.m is correctly identified as a redefinition of Sup.m. Go to superclass definition works, the green arrow is displayed in front. Ctrl-T (quick hierarchy) on Sup.m correctly shows Sub.m as a redefinition.

The problem goes away if Sup.m takes String instead of the type parameter C as argument type for parameter "classifier."

Also, show references in workspace (Shift-Ctrl-G) invoked on Sub.m doesn't show any results, probably based on the same bug.

I'll attach the example as an exported project for reproduction.

Reproducible: Always

Steps to Reproduce:
1. Add the above classes to a new empty project
2. Go to Sub.m
3. Invoke either "References in Workspace" or "Caller Hierarchy"
Comment 1 Axel Uhl CLA 2010-06-22 09:22:02 EDT
Created attachment 172412 [details]
Project flie to reproduce the problem
Comment 2 Frederic Fusier CLA 2010-06-22 09:36:55 EDT
Unfortunately, the Search Engine has this issue for a long time :-(

*** This bug has been marked as a duplicate of bug 123836 ***
Comment 3 Satyam Kandula CLA 2012-03-13 10:43:17 EDT
Verified for 3.8M6 using build I20120312-1300