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
return;			
			if (command.text != null && command.length == 0 && endsWithDelimiter(document, command.text))
				jdocIndentAfterNewLine(document, command);
		
			else if (command.text != null && command.text.equals("/")) 
				jdocIndentForCommentEnd(document, command);
		
			else if (command.text == null || command.text.length() == 0)
				jdocHandleBackspaceDelete(document, command);
		
			else if (command.text != null && command.length == 0 && command.text.length() > 0)
				jdocWrapParagraphOnInsert(document, command);
		} catch (BadLocationException e) {
			
		}
	}
	private void flushCommand(IDocument document, DocumentCommand command) throws BadLocationException {
		if (!command.doit)
			return;
		
		document.replace(command.offset, command.length, command.text);
		command.doit= false;
		if (command.text != null)
			command.offset += command.text.length();
		command.length= 0;
		command.text= null;			
	}
	protected void jdocWrapParagraphOnInsert(IDocument document, DocumentCommand command) throws BadLocationException {
		Assert.isTrue(command.length == 0);
		Assert.isTrue(command.text != null && command.text.length() == 1);