Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 316667 - [hovering] Javadoc should be more agile about javadoc for inherited classes.
Summary: [hovering] Javadoc should be more agile about javadoc for inherited classes.
Status: RESOLVED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows Server 2003
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-11 22:35 EDT by Dave Dyer CLA
Modified: 2010-06-12 04:18 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Dyer CLA 2010-06-11 22:35:54 EDT
Build Identifier: 

Javadoc search is not agile enough. 

If I have class A with method B which has javadoc
and I have class C inherits B

if I have  C foo = xxx;
and I write
   foo.B( ...
I would expect the javadoc for A.B to be found.  It is not.  Instead it searches
for the nonexistent javadoc for C



 

Reproducible: Always
Comment 1 Dani Megert CLA 2010-06-12 02:51:48 EDT
The Eclipse SDK does not include a Javadoc search. Please report the bug to the provider of Javadoc search.
Comment 2 Dani Megert CLA 2010-06-12 02:58:38 EDT
Or do you refer to the Javadoc shown in the hovers? If so, please provide a complete test case and reopen this bug.
Comment 3 Dave Dyer CLA 2010-06-12 03:38:20 EDT
I refer to the javadoc lookup I get when I hit F2, but the "hover" javadoc
ought to get it too.  What I do get is the method skeleton, but not the
corresponding javadoc.
Comment 4 Deepak Azad CLA 2010-06-12 03:47:13 EDT
(In reply to comment #3)
> I refer to the javadoc lookup I get when I hit F2, but the "hover" javadoc
> ought to get it too.  What I do get is the method skeleton, but not the
> corresponding javadoc.
Can you please provide a code snippet? It works for me with the following snippet.

package p;
class A {
	/**
	 * it does something
	 */
	void b() {
		
	}
}

class C extends A {
	void b() {
		
	}
	public static void main(String[] args) {
		C c=new C();
		c.b(); // select b and press F2
	}
}
Comment 5 Dave Dyer CLA 2010-06-12 04:08:28 EDT
import java.awt.Menu;

public class test {


	public void m()
	{
	Menu aa = new Menu("foo");
	aa.add(
	}
}


aa.add( and hover suggests an argument list, but never shows
javadoc; and if I highlight "add" and hit F2, I get "no page" for
test.html, which is not useful.

If I close the parens (creating an invalid but complete function call,
I get the javadoc for Menu, which is what I hope to see from hovering.
and F2, without closing the paren (I knew "no arguments" was incorrect).
Comment 6 Dani Megert CLA 2010-06-12 04:18:17 EDT
This behavior is expected: The problem is that until the arguments are there, we don't know which method is meant: you first have to choose either by adding the arguments manually or by using content assist (Ctrl + Space) which will show you all the variants along with Javadoc on the right side.