1

I was typing some code in eclipse and as soon as I start to use the javadoc @param tag the IDE show me an error mark as seen in the picture. When I use the given solution from eclipse, the IDE corrects for example @param board to @paramboard but this is not the correct notation as I know. The javadoc tag @see don't show such error as seen in the picture. Do I miss some setting here or do I mistaken here something?

Thanks in advance! Screenshot of my IDE with the error mark

1 Answers1

2

Try opening your Javadoc comment block with /** instead of /*:

Example:

https://www.oracle.com/technical-resources/articles/java/javadoc-tool.html

/**
* Returns an Image object that can then be painted on the screen. 
* The url argument must specify an absolute <a href="#{@link}">{@link URL}</a>. The name
* argument is a specifier that is relative to the url argument. 
* <p>
* This method always returns immediately, whether or not the 
* image exists. When this applet attempts to draw the image on
* the screen, the data will be loaded. The graphics primitives 
* that draw the image will incrementally paint on the screen. 
*
* @param  url  an absolute URL giving the base location of the image
* @param  name the location of the image, relative to the url argument
* @return      the image at the specified URL
* @see         Image
*/
public Image getImage(URL url, String name) {
  try {
    return getImage(new URL(url, name));
  } 
  catch (MalformedURLException e) {
    return null;
  }
}
paulsm4
  • 114,292
  • 17
  • 138
  • 190
  • I tried your solution and now the javadoc tags get highlighted. The Error still appeared and I disabled spell checking, now it won't get error marked. It seems to be a problem with the spell checking. Thank you for your help! – Heracless123 Feb 03 '23 at 18:11
  • 1
    Cool - glad you got it working. The main point is that you need the `/** ... */` comment delimiters so that the Javadoc tool can distinguish between a "Javadoc comment block" (which *SHOULD* be incorporated into the Javadoc output) and "ordinary" comments (which shouldn't). – paulsm4 Feb 03 '23 at 19:40
  • Ahh that makes sense. That no one has told me before xD thanks again for your help. – Heracless123 Feb 04 '23 at 12:42