private boolean hasNLSTag(int sourceStart) { // search the last comment where commentEnd < current lineEnd if (this.lineEnds == null) return false; int index = Arrays.binarySearch(this.lineEnds, sourceStart); int currentLineEnd = getLineEnd(-index); if (currentLineEnd != -1) { int commentIndex = getCommentIndex(currentLineEnd); if (commentIndex < 0) { commentIndex = -commentIndex - 2; } if (commentIndex >= 0 && commentIndex < this.commentPositions.length) { int start = this.commentPositions[commentIndex][0]; if (start < 0) { start = -start; // 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, currentLineEnd) != -1; } } } } return false; }
private boolean hasNLSTag(int sourceStart) { // search the last comment where commentEnd < current lineEnd if (this.lineEnds == null) return false; int index = Arrays.binarySearch(this.lineEnds, sourceStart); int currentLineEnd = getLineEnd(-index); if (currentLineEnd != -1) { int commentIndex = getCommentIndex(currentLineEnd); if (commentIndex < 0) { commentIndex = -commentIndex - 2; } if (commentIndex >= 0 && commentIndex < this.commentPositions.length) { int start = this.commentPositions[commentIndex][0]; if (start < 0) { start = -start; // 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, currentLineEnd) != -1; } } } } return false; }
private boolean hasNLSTag(int sourceStart) { // search the last comment where commentEnd < current lineEnd if (this.lineEnds == null) return false; int index = Arrays.binarySearch(this.lineEnds, sourceStart); int currentLineEnd = getLineEnd(-index); if (currentLineEnd != -1) { int commentIndex = getCommentIndex(currentLineEnd); if (commentIndex < 0) { commentIndex = -commentIndex - 2; } if (commentIndex >= 0 && commentIndex < this.commentPositions.length) { int start = this.commentPositions[commentIndex][0]; if (start < 0) { start = -start; // 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, currentLineEnd) != -1; } } } } return false; }
int index = getCommentIndex(commentIndex, offset); int adaptedOffset = offset; int adaptedLength = length; index = getCommentIndex(commentIndex, offset+length-1); if (index >= 0 && this.commentPositions[index][0] >= 0) { // only javadoc or block comment
int index = getCommentIndex(commentIndex, offset); int adaptedOffset = offset; int adaptedLength = length; index = getCommentIndex(commentIndex, offset+length-1); if (index >= 0 && this.commentPositions[index][0] >= 0) { // only javadoc or block comment
int index = getCommentIndex(commentIndex, offset); int adaptedOffset = offset; int adaptedLength = length; index = getCommentIndex(commentIndex, offset+length-1); if (index >= 0 && this.commentPositions[index][0] >= 0) { // only javadoc or block comment