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

Bug 314094

Summary: [hovering] @see method link in Javadoc doesn't work correctly if the method is in superclass
Product: [Eclipse Project] JDT Reporter: Lakshmi P Shanmugam <lshanmug>
Component: TextAssignee: JDT-Text-Inbox <jdt-text-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, markus.kell.r
Version: 3.6   
Target Milestone: 3.7 M6   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Lakshmi P Shanmugam CLA 2010-05-24 06:50:32 EDT
Consider the following 2 classes:

public class ClassParent {
	public void foo1() {
	}
}

public class ClassChild extends ClassParent{
	/**
	 * @see #foo1()
	 */
	public void foo2() {
		foo1();
	}
}

Steps to reproduce:
1) Open ClassChild and select method foo2
2) In the javadoc view, under the See Also section there is link to method foo1, click on foo1 link.
The javadoc for ClassChild opens instead of the doc for foo1.

Selecting foo1 in @see #foo1 in the Java editor shows the javadoc correctly in the javadoc view.
Comment 1 Dani Megert CLA 2010-05-25 03:27:30 EDT
Works in 3.5.2 - got broken during 3.6 M3.

Additional problem is that the focus is gone after that (not returned to editor).
Comment 2 Dani Megert CLA 2010-05-25 03:36:41 EDT
Seems to work on Linux.

Maybe caused by fix for bug 275890 and bug 276065.
Comment 3 Markus Keller CLA 2010-05-26 07:09:01 EDT
Restoring summary and severity. This bug is about links to methods from supertypes.

This never worked because JavaElementLinks#parseURI(URI) just resolves the link with type.getMethod(..) etc. for now. See
//TODO: reference can also point to method from supertype
Comment 4 Dani Megert CLA 2010-05-26 07:15:32 EDT
Agree. Filed bug 314432 for the problem I found.
Comment 5 Markus Keller CLA 2011-02-18 06:28:38 EST
Fixed in org.eclipse.jdt.internal.ui.viewsupport.JavaElementLinks.