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
switch (element.getElementType()) {
		case IJavaElement.TYPE:
			return createTypeTags(document, command, indentation, lineDelimiter, (IType) element);	
		case IJavaElement.METHOD:
			return createMethodTags(document, command, indentation, lineDelimiter, (IMethod) element);
		default:
			return null;
		}		
	}
	private String createTypeTags(IDocument document, DocumentCommand command, String indentation, String lineDelimiter, IType type)
		throws CoreException, BadLocationException
	{
		Template[] templates= Templates.getInstance().getTemplates();
		String comment= null;
		for (int i= 0; i < templates.length; i++) {
			if ("typecomment".equals(templates[i].getName())) { 
				comment= JavaContext.evaluateTemplate(templates[i], type.getCompilationUnit(), type.getSourceRange().getOffset());
				break;
			}
		}
		
		if (comment != null) {
			comment= comment.trim();
			if (comment.endsWith("*/")) 
				comment= comment.substring(0, comment.length() - 2);
			comment= comment.trim();
			if (comment.startsWith("/**")) 
				comment= comment.substring(3);
		}
		return (comment == null || comment.length() == 0)