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
if (command.text != null && command.text.equals("/")) { 
				jdocIndentForCommentEnd(document, command);
				return;
			}
			ITypedRegion partition= document.getPartition(command.offset);			
			int partitionStart= partition.getOffset();
			int partitionEnd= partition.getLength() + partitionStart;			
			
			String text= command.text;
			int offset= command.offset;
			int length= command.length;
			
			final int PREFIX_LENGTH= "/*".length(); 
			final int POSTFIX_LENGTH= "*/".length(); 
			if ((offset < partitionStart + PREFIX_LENGTH || offset + length > partitionEnd - POSTFIX_LENGTH) ||
				text != null && text.length() >= 2 && ((text.indexOf("*/") != -1) || (document.getChar(offset) == '*' && text.startsWith("/")))) 
				return;			
			if (command.text == null || command.text.length() == 0)
				jdocHandleBackspaceDelete(document, command);
		
			else if (command.text != null && command.length == 0 && command.text.length() > 0)
				jdocWrapParagraphOnInsert(document, command);
		} catch (BadLocationException e) {
			JavaPlugin.log(e);
		}
	}
	private void flushCommand(IDocument document, DocumentCommand command) throws BadLocationException {
		if (!command.doit)
			return;