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
if (!getPreferenceStore().getBoolean(CompilationUnitEditor.FORMAT_JAVADOCS))
			return;
		int line= document.getLineOfOffset(command.offset);
		IRegion region= document.getLineInformation(line);
		int lineOffset= region.getOffset();
		int lineLength= region.getLength();
		String lineContents= document.get(lineOffset, lineLength);						
		StringBuffer buffer= new StringBuffer(lineContents);
		int start= command.offset - lineOffset;
		int end= command.length + start; 
		buffer.replace(start, end, command.text);
		
				
		if (command.text != null && command.text.length() != 0 && command.text.trim().length() == 0) {
			String endOfLine= document.get(command.offset, lineOffset + lineLength - command.offset);
			
			if (endOfLine.length() == 0) {
				
				flushCommand(document, command);
				if (isLineTooShort(document, line)) { 
					int[] caretOffset= {command.offset};
					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);