Bug 51600 - Javadoc: tags with errors are not stored in DOM AST Javadoc hierarchy
Summary: Javadoc: tags with errors are not stored in DOM AST Javadoc hierarchy
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 M9   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 51617 (view as bug list)
Depends on:
Blocks: 54424
  Show dependency tree
 
Reported: 2004-02-11 05:36 EST by Frederic Fusier CLA
Modified: 2004-05-18 11:58 EDT (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 Frederic Fusier CLA 2004-02-11 05:36:35 EST
Build I200402040800.

In following example:
public class X {
  /**
   * @param str
   * @see #
   * @return String
   */
  String foo(String str) { return ""; }

there's no @see tag is Javadoc DOM AST node.

This a general problem, when a syntax error occurs in a tag element, there's no 
tag element which is built. This behavior should be improved to create a tag 
(as we have recognize it as a @see tag), but add only a text fragment with the 
offending syntax to its children.
Comment 1 Frederic Fusier CLA 2004-03-24 16:27:04 EST
*** Bug 51617 has been marked as a duplicate of this bug. ***
Comment 2 Frederic Fusier CLA 2004-05-11 05:37:54 EDT
Fixed.

Now all tags are created even if they are invalid. In this case, we consider
such tags as extra tags and just store their name and the text after.
For example, this means that <code>* @see UnknownReference</code> will be only a
tag element which name would be "@see" and has one single text element
' UnknownReference'.

[jdt-core-internal]
Changes made in parseComment(int,int) of AbstractCommentParser: when syntax is
invalid while parsing known tag, then now parse simple tag instead and start
text fragment storage.
Also, change Javadoc, JavadocParser and JavadocSingleTypeReference to remember
parameters of invalid tags separately than parameters. This allow binding on
parameters which effectively match method parameters but in invalid syntax (for
example in duplicate or missplaced tags - see bug 51617).
Test cases added in ASTConverterJavadocTest

Comment 3 Olivier Thomann CLA 2004-05-18 11:50:47 EDT
In:
	   * @param str
	   * @see #
	   * @return String

the text element for the @see of @return includes the space between the tag and
the  text element.
I don't think the space should be included.
Comment 4 Olivier Thomann CLA 2004-05-18 11:53:30 EDT
Verified in 200405180816
Comment 5 Frederic Fusier CLA 2004-05-18 11:58:14 EDT
For space(s) between tag name and text, this is a point already debated in
bug 54424 comment 2.