Bug 44035 [formatting] Error in formatting parts of java code snippets in comment
This is for build I20030930. The Java code formatter options are set to Format java code snippets. Taking the following comment: /** * The following is a Java snipet. * * <pre> * while ((size = availableSize(stream, size)) > 0) { * System.out.println("available"); * } * </pre> */ public void test() { } And trying to format it here is what we got: /** * The following is a Java snipet. * * <pre> * while ((size = availableSize(stream, size)) > 0) { * System.out.println("available"); } * </pre> */ public void test() { }
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/comment/CommentRange.java
* @param position
	 *                  Offset of the range
	 * @param count
	 *                  Length of the range
	 */
	public CommentRange(final int position, final int count) {
		super(position, count);
	}
	/**
	 * Is the attribute <code>attribute</code> true?
	 * 
	 * @param attribute
	 *                  The attribute to get.
	 * @return <code>true</code> iff this attribute is <code>true</code>,
	 *               <code>false</code> otherwise.
	 */
	protected final boolean hasAttribute(final int attribute) {
		return (fAttributes & attribute) == attribute;
	}
	/**
	 * Is this javadoc range a closing html tag?
	 * 
	 * @param token
	 *                  Token belonging to the javadoc range
	 * @param tag
	 *                  Html tag to find
	 * @return <code>true</code> iff this javadoc is a closing html tag,
	 *               <code>false</code> otherwise
	 */
	protected final boolean isClosingTag(final String token, final String tag) {