Summary: | [content assist] Package-level javadoc requires fully-qualified refs for @see and @link tags | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | James Shaw <js102> | ||||||
Component: | Text | Assignee: | JDT-Text-Inbox <jdt-text-inbox> | ||||||
Status: | VERIFIED FIXED | QA Contact: | |||||||
Severity: | normal | ||||||||
Priority: | P3 | CC: | daniel_megert, frederic_fusier, jarthana, markus.kell.r, Olivier_Thomann | ||||||
Version: | 3.5 | ||||||||
Target Milestone: | 3.6 M2 | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Whiteboard: | |||||||||
Attachments: |
|
Description
James Shaw
2009-07-14 09:41:26 EDT
Jay, please investigate. This might be a problem if you are trying to run Javadoc for an individual file. Can you please try passing in the package names or a wildcard (*)? This is just to ensure that Javadoc is aware of the other classes/sources that are being referred to at the time of processing. I tried with both these options and the output is fine. Let me know if this helps. See the attached test case to reproduce the bug. Autocompletion on the @see OtherClass tag must use the fully-qualified class name. Warning when running is: C:\workspace\javadoc-package-bug\src\foo\package-info.java:4: warning - Tag @see: reference not found: OtherClass Created attachment 142368 [details]
Test case
Just a behavior I observed: I see that Javadoc is not complaining when the references are made in any java file (in the same package) other than package-info.java. The generated HTML files have the proper links too. This could be a Javadoc bug. But I am yet to verify this. Will update the bug once I check on that. This is not a javadoc bug, see http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/javadoc.html#packagecomment "If you add a @see tag in a package comment file, it must have a fully-qualified name." On investigation, I think this may have to be fixed in JDT/UI. Moving to JDT/UI for consideration. Perhaps one possible place for the fix is - org.eclipse.jdt.internal.ui.text.java.LazyJavaTypeCompletionProposal.computeReplacementString() Created attachment 143871 [details]
Proposed Patch
Attaching a fix for review by JDT/UI committers.
Thanks Jay, the proposed patch is basically correct. I fixed it a little bit differently to have the correct code comments. FYI: The fix caused an NPE (bug 289028, fixed in HEAD). Verified for 3.6M2 using I20090915-0100. |