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
private final String fString;
		private final BreakIterator fIterator= BreakIterator.getLineInstance();
				
		private int fStart;
		private int fEnd;
		private int fBufferedEnd;
		
		public LineBreakIterator(String string) {
			fString= string;
			fIterator.setText(string);
		}
		
		public int first() {
			fBufferedEnd= -1;
			fStart= fIterator.first();
			return fStart;	
		}
		
		public int next() {
			
			if (fBufferedEnd != -1) {
				fStart= fEnd;
				fEnd= fBufferedEnd;
				fBufferedEnd= -1;
				return fEnd;
			}