### 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.106 diff -u -r1.106 Scribe.java --- formatter/org/eclipse/jdt/internal/formatter/Scribe.java 24 Apr 2007 15:36:01 -0000 1.106 +++ formatter/org/eclipse/jdt/internal/formatter/Scribe.java 29 May 2007 02:06:38 -0000 @@ -628,14 +628,14 @@ // check that we are on the same line int lineIndexForComment = Arrays.binarySearch(this.lineEnds, start); if (lineIndexForComment == index) { - return CharOperation.indexOf(Scanner.TAG_PREFIX, this.scanner.source, true, start) != -1; + return CharOperation.indexOf(Scanner.TAG_PREFIX, this.scanner.source, true, start, currentLineEnd) != -1; } } } } return false; } - + public void indent() { this.indentationLevel += this.indentationSize; this.numberOfIndentations++; @@ -1094,7 +1094,7 @@ private void printLineComment(char[] s) { int currentTokenStartPosition = this.scanner.getCurrentTokenStartPosition(); int currentTokenEndPosition = this.scanner.getCurrentTokenEndPosition() + 1; - if (CharOperation.indexOf(Scanner.TAG_PREFIX, this.scanner.source, true, currentTokenStartPosition) != -1) { + if (CharOperation.indexOf(Scanner.TAG_PREFIX, this.scanner.source, true, currentTokenStartPosition, currentTokenEndPosition) != -1) { this.nlsTagCounter = 0; } this.scanner.resetTo(currentTokenStartPosition, currentTokenEndPosition - 1);