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/CommentRegion.java
protected boolean canAppend(final CommentLine line, final CommentRange previous, final CommentRange next, final int index, final int width) {
		return index == 0 || index + next.getLength() < width;
	}
	/**
	 * Can the whitespace between the two comment ranges be formatted?
	 * 
	 * @param previous
	 *                   Previous comment range which was already formatted
	 * @param next
	 *                   Next comment range to be formatted
	 * @return <code>true</code> iff the next comment range can be formatted,
	 *               <code>false</code> otherwise.
	 */
	protected boolean canFormat(final CommentRange previous, final CommentRange next) {
		return true;
	}
	/**
	 * Formats the comment region.
	 * 
	 * @param indentation
	 *                   The indentation of the comment region
	 * @return The resulting text edit of the formatting process
	 */
	public final TextEdit format(final String indentation) {
		fResult= new MultiTextEdit();
		final String probe= getText(0, CommentLine.NON_FORMAT_START_PREFIX.length());
		if (!probe.startsWith(CommentLine.NON_FORMAT_START_PREFIX)) {
			int margin= 80;
			try {
				margin= Integer.parseInt(fPreferences.get(PreferenceConstants.FORMATTER_COMMENT_LINELENGTH).toString());