Why is Eclipse code formatting broken </a> in the Javadoc @see tag?
I am using Eclipse 3.4 and have configured the Java code formatter with all the options in the Comments tab. The problem is that when I format a comment on a document that contains:
* @see <a href="test.html">test</a> the code formatter inserts a space into the final HTML, breaking it:
* @see <a href="test.html">test< /a> Why? How to stop this?
This was not fixed by disabling any of the options on the Comments tab, for example, "Format HTML tags." The only thing I found was to completely disable Javadoc formatting by disabling both the formatting of the Enable Javadoc comments and the Enable block comment formatting options, which means that I need to manually format the comment blocks.
I can only assume that this is a bug in Eclipse. This only happens with @see tags, this happens for all 3 built-in code formatting settings.
There are some interesting errors that have already been discovered in the neighborhood, but I could not find this particular one. See For example, @see search in Eclipse Bugzilla .
Strict XML specifications require that self-closing tags must have a space before the closing slash:
<gcServer enabled="true" /> <!-- note the space just after "true" --> I can only assume, as Bart said, that there is a fix in Eclipse that considers the closing tag to be actually a self-closing tag. Another idea: can you verify that your a tags are balanced (i.e. closed tags are not listed in the document)?