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
i++;						
			return string.substring(i);
		} else {
			int i= length;
			while (i > 0 && Character.isWhitespace(string.charAt(i - 1)))
				i--;
			return string.substring(0, i);	
		}
	}
	/**
	 * Method jdocWrapParagraphFromLine.
	 * 
	 * @param document
	 * @param line
	 * @param always
	 */
	private void jdocWrapParagraphFromLine(IDocument document, int line, int[] caretOffset, boolean always) throws BadLocationException {
		String indent= jdocExtractLinePrefix(document, line);
		if (!always) {
			if (!indent.trim().startsWith("*")) 
				return;
			if (indent.trim().startsWith("*/")) 
				return;
			if (!isLineTooLong(document, line) && !isLineTooShort(document, line))
				return;
		}
		int caret= caretOffset[0];
		int caretLine= document.getLineOfOffset(caret);
		int lineOffset= document.getLineOffset(line);
		int paragraphOffset= lineOffset + indent.length();