Bug 25870 Code assist for comments doesn't add new line character.
Eclipse's code assist for comment and javadoc doesn't add a line feed character to the second line of comment, it adds only carriage return character. Since other editors do not treat carriage return itself as a line feed, line nubmers for the source will appear differently between eclipse and other editors. HOW TO REPRODUCE: 1. In java file, type /** then press enter. eclipse will add the following to the source. /** * comment */ 2. Open this file with a different editor: vi, emacs, etc. You will see your comment looking like this instead... /** * comment */ 3. line number for your source after this comment will appear differently between eclipse editor and any other editor.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/JavaDocAutoIndentStrategy.java
document.replace(c.offset - length + 1, length, null);
				c.doit= false;
				c.offset -= length - 1;
				c.length= 0;
				return;
			} else {
				document.replace(c.offset, c.length, null);
				c.doit= false;
				c.length= 0;
			}
		} catch (BadLocationException e) {
			JavaPlugin.log(e);
		}
		if (!getPreferenceStore().getBoolean(CompilationUnitEditor.FORMAT_JAVADOCS))
			return;
		
		try {
			int line= document.getLineOfOffset(c.offset);
			int lineOffset= document.getLineOffset(line);
			String prefix= jdocExtractLinePrefix(document, line);
			boolean always= c.offset > lineOffset && c.offset <= lineOffset + prefix.length();
			int[] caretOffset= {c.offset};
			jdocWrapParagraphFromLine(document, document.getLineOfOffset(c.offset), caretOffset, always);
			c.offset= caretOffset[0];
		} catch (BadLocationException e) {
			JavaPlugin.log(e);
		}
	}
	/**
	 * Returns the compilation unit of the CompilationUnitEditor invoking the AutoIndentStrategy,