Summary: | [DCR] [Javadoc] Add a Javadoc option not to report errors on non-visible references | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Richard Davies <eclipse> |
Component: | Core | Assignee: | Frederic Fusier <frederic_fusier> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | enhancement | ||
Priority: | P3 | CC: | channingwalton, martinae |
Version: | 3.0 | ||
Target Milestone: | 3.1 M3 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: | |||
Bug Depends on: | |||
Bug Blocks: | 217891 |
Description
Richard Davies
2004-03-06 14:44:30 EST
This is a requirement for a new option, not a bug. *** Bug 60571 has been marked as a duplicate of this bug. *** Post 3.0 I think this is a bug, not a feature request. The fact that a reference is non-visible in code does not apply for Javadoc references. To fix it, I don't think adding a new option is the way to go, simply do not report that warning. I would suggest to have that in 3.0 as otherwise I can't get my code warning- free what lowers the usability of the Javadoc compiler warnings. I disagree. We treat Javadoc exactly as we treat source code. Visibility is enforced, and I suspect the extra warnings you can't get rid of are not in real API javadoc. If so, these would likely be inconsistent since targeting entities which aren't part of the javadoc in the end. This is a useful warning. We may tweak it some more post 3.0. Try my example in bug 60571. Generate documentation using javadoc.exe and you get (with no warning or error) the documentation containing a link to a method that I couldn't call in my code due to visibility restrictions, but that Javadoc obviously still allows my to refer to in my documentation. The Javadoc tool is setting the rules here, we shouldn't invent our own. Note that there might be somthing related: We can say to only generate documentation for public members. In that case it would make sense to warn on all references that point to protected or less visible members. This is not the problem here. Here I configured to document all classes. Maybe that's what you had in mind, but then the current implementation has a bug. *** Bug 75068 has been marked as a duplicate of this bug. *** Reconsider for 3.1 Fixed. New compiler option has been added to address this issue: * COMPILER / Reporting Invalid Javadoc Tags with Not Visible References * Specify whether the compiler will report non-visible references used in Javadoc tags. * <br>Note that this diagnosis can be enabled based on the visibility of the construct associated with the Javadoc; * also see the setting "org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility". * - option id: "org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef" * - possible values: { "enabled", "disabled" } * - default: "enabled" * See also bug 75701. [jdt-core-internal] Test cases added in JavadocTestOptions. Verified for 3.1M3 with build I20041102 *** Bug 84683 has been marked as a duplicate of this bug. *** |