Bug 87868 - [1.5][javadoc][assist] Dodgy completion in javadoc comment
Summary: [1.5][javadoc][assist] Dodgy completion in javadoc comment
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.2 M3   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 87869 89186 90573 102735 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-03-13 00:41 EST by R Lenard CLA
Modified: 2007-12-07 00:44 EST (History)
5 users (show)

See Also:


Attachments
Code snippet with erroneous errors given. (1.41 KB, text/plain)
2005-03-16 18:55 EST, R Lenard CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description R Lenard CLA 2005-03-13 00:41:59 EST
For this code when I try to put in javadoc mentioning a method taking a generic 
typed parameter an error is given about the type - this is given both when 
generated from a method selection.

The message given is "Javadoc: The method process(Object) in the type Test2 is 
not applicable for the arguments (S)"

Either the reference that is inserted when I choose it should be process
(Object) or there is a problem with parsing of javadoc references.

Here's the snippet that caused the problem.
% cat Test2.java
/**
 * Comment
 * @param <S> the type this is for
 */
public abstract class Test2<S>
{
    /**
     * Process the ip
     * @param ip
     */
    public void process(S ip) {
        assert ip != null;
    }
}

class SubTest2<S> extends Test2<S> {
    // This is what is given by the quickfix after entering {@link Test2#pro
    /** Calls {@link Test2#process(S)}. **/
    public void foo() {
        
    }
    // This is okay ??
    /** Calls {@link Test2#process(Object)}. **/
    public void bar() {
        
    }
}
Comment 1 Frederic Fusier CLA 2005-03-13 13:02:18 EST
This is not quickfix but code assist which complete the code after Test2#pro...
Currently code assist in Javadoc comments is handled by JDT/Text
=> move to this component.

Note: Parse of Javadoc is correct and matches javadoc.exe behavior which returns
a similar error on this reference:
D:\usr\OTI\workspaces\tests\bugs\Divers15\b87868\SubTest.java:5: warning - Tag
@link: can't find process(S) in Test
Comment 2 Dani Megert CLA 2005-03-14 13:29:05 EST
*** Bug 87869 has been marked as a duplicate of this bug. ***
Comment 3 R Lenard CLA 2005-03-16 18:55:44 EST
Created attachment 18881 [details]
Code snippet with erroneous errors given.

Notice how it's not possible to come up with a javadoc version that is correct
(from Eclipses perspective)
Comment 4 R Lenard CLA 2005-03-16 18:57:26 EST
Updated with a code snippet that shows other cases that are dealt with 
incorrectly (even when you set to what javadoc accepts).
Comment 5 Dani Megert CLA 2005-04-26 17:29:00 EDT
*** Bug 90573 has been marked as a duplicate of this bug. ***
Comment 6 Dani Megert CLA 2005-05-30 13:21:31 EDT
*** Bug 97316 has been marked as a duplicate of this bug. ***
Comment 7 Dani Megert CLA 2005-05-30 13:21:39 EDT
*** Bug 89186 has been marked as a duplicate of this bug. ***
Comment 8 Dani Megert CLA 2005-09-16 04:28:22 EDT
Moving due to change of component ownership.
Comment 9 Frederic Fusier CLA 2005-10-10 11:22:12 EDT
*** Bug 102735 has been marked as a duplicate of this bug. ***
Comment 10 Frederic Fusier CLA 2005-10-20 16:35:16 EDT
Fixed and released in HEAD.

Test case added in JavadocBugsCompletionModelTest.
Comment 11 David Audel CLA 2005-10-31 07:02:12 EST
Verified for 3.2 M3 using build I20051031-0010
Comment 12 Eric Jodet CLA 2007-12-07 00:44:00 EST
Due to the correction of bug 209936, the test case corresponding to this bug had to be modified.
See bug 209936 and also bug 80257 for details.
All references to generic types in Javadocs should in fact have *raw* bindings.

So we assume CA won't display proposals with generics when activated from within a Javadoc:
won't propose process(S)
but
will propose process(Object)