Bug 47215 - Javadoc: type reference in @see tag ignore the following text
Summary: Javadoc: type reference in @see tag ignore the following text
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.0 M6   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-21 07:48 EST by David Audel CLA
Modified: 2003-12-16 10:02 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Audel CLA 2003-11-21 07:48:35 EST
1) enabled "problems in javadoc tags"
2) create X.java
/**
 * @see X
 * @see X#X(int)
 * @see X(double)
 * @see X!=}}
 * @see foo()
 */
public class X {
  public X(int i){}
  public void foo()
}

3) compile
"@see X(double)" and "@see X!=}}" have no error. "@see foo()" has an error.
These @see tags are considered as type reference and the following text is 
ignored. Perhaps it should be not ignored.
Comment 1 Frederic Fusier CLA 2003-11-21 12:36:47 EST
Javadoc spec 1.4 precise that after @see <reference> user can only put a label.
Currently compiler does not verify the end of the line after the reference in 
@see tag.

He has to do it...
Comment 2 Frederic Fusier CLA 2003-11-21 12:57:24 EST
Ignore my last comment, the label can be a sentence.
 * @see <reference> A sentence which can include embedded tag: {@link String}
is a valid @see reference...

I think the solution may be to verify that there's a white space after the type 
reference.
 * @see X(double)
would be invalid altough
 * @see X (double)
would  be valid.

Another solution would be to verify that first token after the referenced type 
is not a open parenthesis. This would avoid confusion with method/constructor  
reference.
 * @see X(double)
 * @see X (double)
would be both invalid
 * @see X My test class
 * @see X [My test class]
 * @see X[My test class]
would  be valid.

Your opinion?
Comment 3 Philipe Mulet CLA 2003-11-24 07:00:34 EST
Ok by me.
Comment 4 Frederic Fusier CLA 2003-12-01 04:49:50 EST
Fixed using second solution...

Test case added in tests.compiler.regression.JavadocTestMixed
Comment 5 David Audel CLA 2003-12-16 10:02:23 EST
Verified for 3.0M6