### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core Index: formatter/org/eclipse/jdt/internal/formatter/Scribe.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/Scribe.java,v retrieving revision 1.133 diff -u -r1.133 Scribe.java --- formatter/org/eclipse/jdt/internal/formatter/Scribe.java 6 May 2008 08:47:45 -0000 1.133 +++ formatter/org/eclipse/jdt/internal/formatter/Scribe.java 6 May 2008 17:29:17 -0000 @@ -1860,7 +1860,7 @@ int firstColumn = this.column; int indentLevel = this.indentationLevel; int indentations = this.numberOfIndentations; - this.indentationLevel = (this.column / this.tabLength) * this.tabLength; + this.indentationLevel = getNextIndentationLevel(firstColumn); this.numberOfIndentations = this.indentationLevel / this.indentationSize; // Consume the comment prefix #P org.eclipse.jdt.core.tests.model Index: src/org/eclipse/jdt/core/tests/formatter/FormatterCommentsTests.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterCommentsTests.java,v retrieving revision 1.12 diff -u -r1.12 FormatterCommentsTests.java --- src/org/eclipse/jdt/core/tests/formatter/FormatterCommentsTests.java 6 May 2008 08:47:47 -0000 1.12 +++ src/org/eclipse/jdt/core/tests/formatter/FormatterCommentsTests.java 6 May 2008 17:29:19 -0000 @@ -767,6 +767,7 @@ public void testLineComments06() throws JavaModelException { formatUnit("comments.line", "X06.java"); } +// TODO Pass this test case public void _testLineComments07() throws JavaModelException { formatUnit("comments.line", "X07.java"); } @@ -779,6 +780,9 @@ public void testLineComments10() throws JavaModelException { formatUnit("comments.line", "X10.java"); } +public void testLineComments11() throws JavaModelException { + formatUnit("comments.line", "X11.java"); +} /* * Test formatter block lines Index: workspace/FormatterJavadoc/test/comments/line/X11.java =================================================================== RCS file: workspace/FormatterJavadoc/test/comments/line/X11.java diff -N workspace/FormatterJavadoc/test/comments/line/X11.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ workspace/FormatterJavadoc/test/comments/line/X11.java 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,4 @@ +package test.comments.line; + +public class X11 { // This comment will go____over the max line length +} Index: workspace/FormatterJavadoc/test/comments/line/out/default/X11.java =================================================================== RCS file: workspace/FormatterJavadoc/test/comments/line/out/default/X11.java diff -N workspace/FormatterJavadoc/test/comments/line/out/default/X11.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ workspace/FormatterJavadoc/test/comments/line/out/default/X11.java 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,6 @@ +package test.comments.line; + +public class X11 { // This comment will + // go____over the + // max line length +}