Community
Participate
Working Groups
Using (v_725), the contents of the type org.eclipse.jdt.internal.ui.text.java.ContentAssistHistory in JDT/UI code reports two javadoc warnings. I would expect none of them.
There must be javadoc warnings in this case as @value is wrongly used on a member which is not a static field (this is the only valid syntax when compliance <= 1.4: see bug 153399)... The problem here is that we shouldn't complain about duplicate tags, they are all unexpected.
I am talking about this code: /** * Creates a new history, equivalent to * <code>ContentAssistHistory({@value #DEFAULT_TRACKED_LHS}, {@value #DEFAULT_TRACKED_RHS})</code>. */ public ContentAssistHistory() { this(DEFAULT_TRACKED_LHS, DEFAULT_TRACKED_RHS); } Both DEFAULT_TRACKED_LHS and DEFAULT_TRACKED_RHS are private static final fields (i.e. constant fields). I don't know if the @value doesn't work because they are not public, but since the value is inlined it should not matter. Did I miss something?
The syntax {@value reference_to_static_field} is only valid since 1.5. Before, the correct syntax for @value is {@value} put in the javadoc comment of the static field. In the case you're talking about, the javadoc is on the constructor => it's not valid and explains why compiler should comply
Yeah, but it is inside <code> an hence I would not expect JDT Core to check stuff inside that one. You people are just too smart ;-)
Not sure though what the JLS says about that but AFAIK it's pretty vague when it comes to Javadoc, so the buest guess is to check what javadoc.exe does.
(In reply to comment #4) > Yeah, but it is inside <code> an hence I would not expect JDT Core to check > stuff inside that one. You people are just too smart ;-) > Thanks a lot ;-) (In reply to comment #5) > Not sure though what the JLS says about that but AFAIK it's pretty vague when > it comes to Javadoc, so the buest guess is to check what javadoc.exe does. > Even inside <code> tag, javadoc tool 1.4 complain about this syntax: warning - Inline tag {@value} should only be used with a constant field. That was the goal of the bug 153399 fix that JDT compiler warns the same way than javadoc tool on @value tag: SUCCESS :-)
Created attachment 54909 [details] Proposed patch
Released for 3.3 M4 in HEAD stream.
I love you guys ;-)
Fixed the warnings in the code.
Verified for 3.3M4 with I20061212-0010.