Bug 43595 Javadoc formatter adds an extra line every time you format
20030924 Everytime you format a comment with a blank line another blank line is added. STEPS 1)Add a comment like this: /** * Get the progress monitor for a job. If it is a UIJob get the main * monitor from the status line. Otherwise get a background monitor. * * @return IProgressMonitor */ 2) Make a change in another method and format. It will look this this afterwards /** * Get the progress monitor for a job. If it is a UIJob get the main * monitor from the status line. Otherwise get a background monitor. * * * @return IProgressMonitor */
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/comment/JavaDocRegion.java
return false;
			if (next.hasAttribute(JAVADOC_IMMUTABLE) && previous.hasAttribute(JAVADOC_IMMUTABLE))
				return true;
		}
		if (fIndentRootTags && !line.hasAttribute(JAVADOC_ROOT) && !line.hasAttribute(JAVADOC_PARAMETER))
			length -= stringToLength(line.getReference());
		return super.canAppend(line, previous, next, offset, length);
	}
	/*
	 * @see org.eclipse.jdt.internal.ui.text.comment.CommentRegion#canApply(org.eclipse.jdt.internal.ui.text.comment.CommentRange, org.eclipse.jdt.internal.ui.text.comment.CommentRange)
	 */
	protected boolean canApply(final CommentRange previous, final CommentRange next) {
		if (previous != null) {
			final boolean isCurrentCode= next.hasAttribute(JAVADOC_CODE);
			final boolean isLastCode= previous.hasAttribute(JAVADOC_CODE);
			try {
				final int offset= getOffset();
				final IDocument document= getDocument();
				if (!isLastCode && isCurrentCode)
					document.addPosition(CODE_POSITION_CATEGORY, new Position(offset + next.getOffset() + next.getLength()));
				else if (isLastCode && !isCurrentCode)
					document.addPosition(CODE_POSITION_CATEGORY, new Position(offset + previous.getOffset()));
			} catch (BadLocationException exception) {
				
			} catch (BadPositionCategoryException exception) {
				
			}
			if (previous.hasAttribute(JAVADOC_IMMUTABLE) && next.hasAttribute(JAVADOC_IMMUTABLE) && !isLastCode)
				return false;
		}