Bug 77602 - [javadoc] "Only consider members as visible as" is does not work for syntax error
Summary: [javadoc] "Only consider members as visible as" is does not work for syntax e...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M4   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-03 07:42 EST by David Audel CLA
Modified: 2004-12-14 15:30 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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