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
default:
			return null;
		}		
	}
	
	/*
	 * Removes start and end of a comment and corrects indentation and line delimiters.
	 */
	private String prepareTemplateComment(String comment, String indentation, String lineDelimiter) {
		
		if (comment.endsWith("*/")) 
			comment= comment.substring(0, comment.length() - 2);
		comment= comment.trim();
		if (comment.startsWith("/*")) { 
			if (comment.length() > 2 && comment.charAt(2) == '*') {
				comment= comment.substring(3); 
			} else {
				comment= comment.substring(2); 
			}
		}
		return Strings.changeIndent(comment, 0, CodeFormatterUtil.getTabWidth(), indentation, lineDelimiter);
	}
	
	private String createTypeTags(IDocument document, DocumentCommand command, String indentation, String lineDelimiter, IType type)
		throws CoreException, BadLocationException
	{
		String comment= StubUtility.getTypeComment(type.getCompilationUnit(), type.getElementName());
		if (comment != null) {
			comment= prepareTemplateComment(comment.trim(), indentation, lineDelimiter);
		}