Bug 46341 [formatting][implementation] comment line length not correctly applied
(1105 nightly build) when formatting the declaration below, with all default code formatter options (i.e. comment line length = 80), the last word '<code>String</code>' is not correctly moved to anotherline, leaving the last line longer than 80 characters (about 87 characters i think..) /** * Sets the set of identifiers to active activities. * * @param activeActivityIds * the set of identifiers to active activities. This set may be * empty, but it must not be <code>null</code>. If this set * is not empty, it must only contain instances of <code>String</code>. */ void setActiveActivityIds(Set activeActivityIds);
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/comment/MultiCommentRegion.java
return true;
		}
		if (fIndentRoots && !line.hasAttribute(COMMENT_ROOT) && !line.hasAttribute(COMMENT_PARAMETER))
			count -= stringToLength(line.getIndentationReference());
		return super.canAppend(line, previous, next, index, count);
	}
	/**
	 * @inheritDoc
	 */
	protected String getDelimiter(CommentLine predecessor, CommentLine successor, CommentRange previous, CommentRange next, String indentation) {
		final String delimiter= super.getDelimiter(predecessor, successor, previous, next, indentation);
		if (previous != null) {
			if (previous.hasAttribute(COMMENT_IMMUTABLE | COMMENT_SEPARATOR) && !next.hasAttribute(COMMENT_CODE) && !successor.hasAttribute(COMMENT_BLANKLINE))
				return delimiter + delimiter;
			
			else if ((next.hasAttribute(COMMENT_IMMUTABLE | COMMENT_SEPARATOR) || ((fSeparateRoots || !isClearLines()) && previous.hasAttribute(COMMENT_PARAGRAPH))) && !successor.hasAttribute(COMMENT_BLANKLINE) && !predecessor.hasAttribute(COMMENT_BLANKLINE))
				return delimiter + delimiter;
			else if (fIndentRoots && !predecessor.hasAttribute(COMMENT_ROOT) && !predecessor.hasAttribute(COMMENT_PARAMETER) && !predecessor.hasAttribute(COMMENT_BLANKLINE))
				return delimiter + stringToIndent(predecessor.getIndentationReference(), false);
		}
		return delimiter;
	}
	/**
	 * @inheritDoc
	 */
	protected String getDelimiter(final CommentRange previous, final CommentRange next) {
		if (previous != null) {
			if (previous.hasAttribute(COMMENT_HTML) && next.hasAttribute(COMMENT_HTML))
				return ""; 
			else if (next.hasAttribute(COMMENT_OPEN) || previous.hasAttribute(COMMENT_HTML | COMMENT_CLOSE))