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
while (line == currentLine || isJavaDocLine(document, currentLine)) {
			
			if (buffer.length() != 0 && !Character.isWhitespace(buffer.charAt(buffer.length() - 1))) {
				buffer.append(' ');
				if (currentLine <= caretLine) {
					
					++caret;
				}
			}
			String string= getLineContents(document, currentLine);			
			buffer.append(string);
			currentLine++;
		}
		String paragraph= buffer.toString();
		
		if (paragraph.trim().length() == 0)
			return;
		caretOffset[0]= caretRelativeToParagraphOffset ? caret : 0;
		String delimiter= document.getLineDelimiter(0);
		String wrapped= formatParagraph(paragraph, caretOffset, indent, delimiter, getMargin());
		int beginning= document.getLineOffset(line);
		int end= document.getLineOffset(currentLine);
		document.replace(beginning, end - beginning, wrapped.toString());
		caretOffset[0]= caretRelativeToParagraphOffset ? caretOffset[0] + beginning : caret + beginning;
	}
	
	/**
	 * Line break iterator to handle whitespaces as first class citizens. 
	 */
	private static class LineBreakIterator {