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 tags
	 *                  Set of tags to mark for this comment range
	 * @param prefix
	 *                  The prefix common to all tags in the set
	 * @param token
	 *                  Token belonging to the comment range
	 * @param attribute
	 *                  Attribute to set if the html tag is present
	 */
	protected final void markPrefixTag(final String[] tags, final char prefix, final String token, final int attribute) {
		if (token.charAt(0) == prefix) {
			String tag= null;
			for (int index= 0; index < tags.length; index++) {
				tag= tags[index];
				if (token.equals(tag)) {
					setAttribute(attribute);
					break;
				}
			}
		}
	}
	/**
	 * Marks an attributed comment range with the indicated attribute.
	 * 
	 * @param token
	 *                  Token belonging to the comment range
	 * @param tag
	 *                  The html tag which confines the attributed comment ranges
	 * @param level
	 *                  Hierarchical depth of layered attributed comment ranges