Summary: | [Javadoc] Improve error message for invalid link in @see tags | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Gary Gregory <ggregory> |
Component: | Core | Assignee: | Frederic Fusier <frederic_fusier> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | ||
Version: | 3.0 | ||
Target Milestone: | 3.1 M2 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Gary Gregory
2004-09-08 14:02:35 EDT
However, your reference is invalid: it should end with </a> (you missed the '/')... So, compiler is just a little bit more informative than Javadoc... If you look at generated html, you'll see that Javadoc automatically fixes your mistake... Compiler can't do that, so it only signals the mistake. Doh! Thank you. A better message would be nice of course ;-) I agree but we want to avoid too many different error messages. Perhaps a better positionning of the underlining would have been helpful... I'll have a look on that for 3.1 Now that I think about it, the message is misleading. There is nothing wrong in this case with the "URL link format" ("http://c2.com/cgi/wiki?AlwaysDeclareSerialVersionUid") which is contained in the href attribute. What is wrong is the (anchor) tag. You're right => I reopen the bug to fix in in 3.1 In this case, I propose that only final <a> was underlined by compiler. Also, "Invalid URL link format" error message would be replace by: "Malformed link reference". Fixed. As said in previous comment, only invalid <a> is now underlined in this peculiar case. Error message has been modified for all invalid syntax in link reference of @see tag: "Malformed link reference". Note that in following invalid syntax: /** * @see <a href="...">Valid link</a> Unexpected text... */ public int m() { compiler will now only emphasize the wrong unexpected text after valid link reference with new error message: "Unexpected text". [jdt-core-internal] Changes done in org.eclipse.jdt.internal.compiler.problem.message.properties, ProblemReporter, IProblem to modify and add error messages. Also modify AbstractCommentParser parseHref() and parserReference() methods. No test cases added as current ones already verify these messages and syntaxes => changes done in all JavadocTest* classes to take into account these new messages Verified in I200409240100. |