Project: JDT
Bug 44035 [formatting] Error in formatting parts of java code snippets in comment
Reported: 2003-10-01 16:05:59 | Status: resolved fixed

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() { }

Files changed in fix:
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/comment/CommentFormattingStrategy.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/comment/CommentRange.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/comment/HTMLEntity2JavaReader.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/comment/ICommentAttributes.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/comment/Java2HTMLEntityReader.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/comment/JavaDocRegion.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/comment/JavaSnippetFormattingStrategy.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/comment/MultiCommentLine.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/comment/MultiCommentRegion.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/text/JavaSourceViewerConfiguration.java