Bug 21183 Class javadoc created during "New Class" operation doesn't fill in variables properly [javadoc] [code manipulation]
If you use the enclosing_type variable in your javadoc comment template, it is not properly filled in when you make a new class (using the New Class dialog). Probably the class should be created, then after creating and saving, javadoc should be added. I suspect the variables don't have valid values yet at the time the javadoc is prepended to the class.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/JavaDocAutoIndentStrategy.java
int length= document.getLineDelimiter(line).length() + prefix.length();
					document.replace(c.offset, length, null);
					c.doit= false;
					c.length= 0;
					return;
				}
			
			} else if (document.getChar(c.offset - 1) == '*' && jdocExtractLinePrefix(document, line).length() - 1 >= c.offset - lineOffset) {
				lineDelimiter= document.getLineDelimiter(line - 1);
				String prefix= jdocExtractLinePrefix(document, line);
				int length= (lineDelimiter != null ? lineDelimiter.length() : 0) + prefix.length();
				document.replace(c.offset - length + 1, length, null);
				c.doit= false;
				c.offset -= length - 1;
				c.length= 0;
				return;
			} else {
				document.replace(c.offset, c.length, null);
				c.doit= false;
				c.length= 0;
			}
		} catch (BadLocationException e) {
			JavaPlugin.log(e);
		}
				
		try {
			int line= document.getLineOfOffset(c.offset);
			int lineOffset= document.getLineOffset(line);
			String prefix= jdocExtractLinePrefix(document, line);
			boolean always= c.offset > lineOffset && c.offset <= lineOffset + prefix.length();