View | Details | Raw Unified | Return to bug 189456 | Differences between
and this patch

Collapse All | Expand All

(-)formatter/org/eclipse/jdt/internal/formatter/Scribe.java (-3 / +3 lines)
Lines 628-641 Link Here
628
					// check that we are on the same line
628
					// check that we are on the same line
629
					int lineIndexForComment = Arrays.binarySearch(this.lineEnds, start);
629
					int lineIndexForComment = Arrays.binarySearch(this.lineEnds, start);
630
					if (lineIndexForComment == index) {
630
					if (lineIndexForComment == index) {
631
						return CharOperation.indexOf(Scanner.TAG_PREFIX, this.scanner.source, true, start) != -1;
631
						return CharOperation.indexOf(Scanner.TAG_PREFIX, this.scanner.source, true, start, currentLineEnd) != -1;
632
					}
632
					}
633
				}
633
				}
634
			}
634
			}
635
		}
635
		}
636
		return false;
636
		return false;
637
	}
637
	}
638
	
638
639
	public void indent() {
639
	public void indent() {
640
		this.indentationLevel += this.indentationSize;
640
		this.indentationLevel += this.indentationSize;
641
		this.numberOfIndentations++;
641
		this.numberOfIndentations++;
Lines 1094-1100 Link Here
1094
	private void printLineComment(char[] s) {
1094
	private void printLineComment(char[] s) {
1095
		int currentTokenStartPosition = this.scanner.getCurrentTokenStartPosition();
1095
		int currentTokenStartPosition = this.scanner.getCurrentTokenStartPosition();
1096
		int currentTokenEndPosition = this.scanner.getCurrentTokenEndPosition() + 1;
1096
		int currentTokenEndPosition = this.scanner.getCurrentTokenEndPosition() + 1;
1097
		if (CharOperation.indexOf(Scanner.TAG_PREFIX, this.scanner.source, true, currentTokenStartPosition) != -1) {
1097
		if (CharOperation.indexOf(Scanner.TAG_PREFIX, this.scanner.source, true, currentTokenStartPosition, currentTokenEndPosition) != -1) {
1098
			this.nlsTagCounter = 0;
1098
			this.nlsTagCounter = 0;
1099
		}
1099
		}
1100
		this.scanner.resetTo(currentTokenStartPosition, currentTokenEndPosition - 1);
1100
		this.scanner.resetTo(currentTokenStartPosition, currentTokenEndPosition - 1);

Return to bug 189456