Eclipse comment auto-generation not working when code contains "*/"

Viewed 137

Normally when I type /** right before a class or method definition and then hit return, then Eclipse will automatically generate some templated comments for classes and methods. However, this does not seem to work when there is a */ in the rest of the code.

Example:

public static void foo(String str) {
  foo("*/" + str);
}

When I type /** above the method declaration then I would expect Eclipse to automatically generate this for me:

/**
 * 
 * @param str
 */
 public static void foo(String str) {

However, this does not work. I'm not sure if I'm using it wrong, or there's a way to work around the issue, or if this is a bug with Eclipse. For reference, I'm using Eclipse Oxygen (4.7.0).

0 Answers
Related