Bug 77602

Summary: [javadoc] "Only consider members as visible as" is does not work for syntax error
Product: [Eclipse Project] JDT Reporter: David Audel <david_audel>
Component: CoreAssignee: Frederic Fusier <frederic_fusier>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.1   
Target Milestone: 3.1 M4   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description David Audel CLA 2004-11-03 07:42:06 EST
build I20041102

1) create X.java
public class X {
  /**
   * @see
   * @see UnknownClass
   */
  protected void foo() {
  }
}

1) set javadoc option "Malformed Javadoc comments" to "Error"
   and "Only consider members as visible as" to "Private"

2) build

2 problems appears
Javadoc: Missing reference
Javadoc: UnknownClass cannot be resolved to a type

3) set javadoc option "Only consider members as visible as" to "Public"

4) rebuild 

1 problem remains
Javadoc: Missing reference

This problem is a malformed javadoc comments and should not be reported because
the method is not public.
Comment 1 Frederic Fusier CLA 2004-11-09 05:58:58 EST
Fixed.

All warnings concerning tags are now reported according to visibility level.
Here are warning which will take into account visibility level after the fix
although they did not before:
 - "Only static field reference is allowed for @value tag"
 - "Missing parameter name"
 - "Missing reference"
 - "Missing class name"

However, compiler will continue to report syntax error in Javadoc comments
whatever the visibility level set by user.
So, following warnings will continue to be signaled whatever the visibility level:
 - Unexpected tag
 - Duplicate tag for return type
 - Invalid class name
 - Invalid reference
 - Malformed reference (missing end space separator)
 - Malformed link reference
 - Invalid parameters declaration
 - Invalid tag
 - Missing closing brace for inline tag
 - Missing #: "{0}"
 - Missing return type description
 - Unexpected text

Perhaps UI is ambiguous and should put a specific text for visibility?

[jtd-core-internal]
Changes made in:
 - Javadoc#resolveReference(Expression, Scope)
 - AbstractCommentParser: #parseParam(), #parseReference(), parseThrows()
 - ProblemReporter:
     #javadocInvalidValueReference(...), #javadocMissingParamName(...)
     #javadocMissingReference(...), #javadocMissingThrowsClassName(...)
     #javadocVisibility(int, int)

Test cases added in JavadocTestMixed
Comment 2 Olivier Thomann CLA 2004-12-14 15:30:00 EST
Verified in 200412140800