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
int indexBuffer= -1;
		for (int start= iterator.first(), end= iterator.next(); end != BreakIterator.DONE; start= end, end= iterator.next()) {
			String word= paragraph.substring(start, end);
			
			if (word.trim().length() == 0) {
				whiteSpaceBuffer.append(word);
						
			} else if (lineBuffer.length() == 0) {
				lineBuffer.append(prefix);
				lineBuffer.append(whiteSpaceBuffer.toString());
				lineBuffer.append(word);
			} else {
				String line= lineBuffer.toString() + whiteSpaceBuffer.toString()  + word.toString();
				
				 
				if (calculateDisplayedWidth(line) > margin) {
					
					paragraphBuffer.append(lineBuffer.toString());
					paragraphBuffer.append(lineDelimiter);
					lineBuffer.setLength(0);
					lineBuffer.append(prefix);
					lineBuffer.append(word);
					
					if (indexBuffer != -1) {
						offset[0]= indexBuffer;
						
						if (whiteSpaceBuffer.length() != 0 && index < start && index >= start - whiteSpaceBuffer.length())
							offset[0] -= (index - (start - whiteSpaceBuffer.length()));
						indexBuffer= -1;
					}