Bug 29458 Templates for constructor
When I have an existing constructor within a class, which has a single line comment and I attempt to convert this comment to a multi lie comment, it inserts the 'typecomment' tempalte. In addition, the comment is not correctly indented. For example: before: /** * My typecomment */ public class MyClass { /** my constructor */ public MyClass() { } } after (placing cursor before 'my contructor' and hitting enter): /** * My typecomment */ public class MyClass { /** * My typecomment */ my constructor */ public MyClass() { } }
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/JavaDocAutoIndentStrategy.java
jdocWrapParagraphFromLine(document, line, caretOffset, false);
					command.offset= caretOffset[0];
					return;
				}
				
				if (line < document.getNumberOfLines() - 1 && isJavaDocLine(document, line + 1)) {
					String lineDelimiter= document.getLineDelimiter(line);
					String nextLinePrefix= jdocExtractLinePrefix(document, line + 1);
					command.offset += lineDelimiter.length() + nextLinePrefix.length();
				} 
				return;
			
			} else if (endOfLine.trim().length() == 0) {
				
				return;	
			}
		}
		
		String prefix= jdocExtractLinePrefix(document, line);
		boolean wrapAlways=	command.offset >= lineOffset && command.offset <= lineOffset + prefix.length();
		
		flushCommand(document, command);		
		if (wrapAlways || calculateDisplayedWidth(buffer.toString()) > getMargin() || isLineTooShort(document, line)) {
			int[] caretOffset= {command.offset};								
			jdocWrapParagraphFromLine(document, line, caretOffset, wrapAlways);
			if (!wrapAlways)	
				command.offset= caretOffset[0];
		}
	}
	/**