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
return JavaPlugin.getDefault().getPreferenceStore();		
	}
	/**
	 * Returns the displayed width of a string, taking in account the displayed tab width.
	 * The result can be compared against the print margin.
	 */
	private static int calculateDisplayedWidth(String string) {
		final int tabWidth= getPreferenceStore().getInt(PreferenceConstants.EDITOR_TAB_WIDTH); 
		
		int column= 0;
		for (int i= 0; i < string.length(); i++)
			if ('\t' == string.charAt(i))
				column += tabWidth - (column % tabWidth);
			else
				column++;
				
		return column;
	}
	private String jdocExtractLinePrefix(IDocument d, int line) throws BadLocationException {
		IRegion region= d.getLineInformation(line);
		int lineOffset= region.getOffset();
		int index= findEndOfWhiteSpace(d, lineOffset, lineOffset + d.getLineLength(line));
		if (d.getChar(index) == '*') {
			index++;
			if (index != lineOffset + region.getLength() &&d.getChar(index) == ' ')
				index++;
		}
		return d.get(lineOffset, index - lineOffset);
	}
	private String getLineContents(IDocument d, int line) throws BadLocationException {