/** * Finds the smallest position in <code>fDocument</code> such that the position is >= <code>position</code> * and < <code>bound</code> and <code>Character.isWhitespace(fDocument.getChar(pos))</code> evaluates to <code>false</code> * and the position is in the default partition. * * @param position the first character position in <code>fDocument</code> to be considered * @param bound the first position in <code>fDocument</code> to not consider any more, with <code>bound</code> > <code>position</code>, or <code>UNBOUND</code> * @return the smallest position of a non-whitespace character in [<code>position</code>, <code>bound</code>) that resides in a Java partition, or <code>NOT_FOUND</code> if none can be found */ public int findNonWhitespaceForward(int position, int bound) { return scanForward(position, bound, fNonWSDefaultPart); }
/** * Finds the smallest position in <code>fDocument</code> such that the position is >= <code>position</code> * and < <code>bound</code> and <code>Character.isWhitespace(fDocument.getChar(pos))</code> evaluates to <code>false</code>. * * @param position the first character position in <code>fDocument</code> to be considered * @param bound the first position in <code>fDocument</code> to not consider any more, with <code>bound</code> > <code>position</code>, or <code>UNBOUND</code> * @return the smallest position of a non-whitespace character in [<code>position</code>, <code>bound</code>), or <code>NOT_FOUND</code> if none can be found */ public int findNonWhitespaceForwardInAnyPartition(int position, int bound) { return scanForward(position, bound, fNonWS); }
/** * Finds the smallest position in <code>fDocument</code> such that the position is >= <code>position</code> * and < <code>bound</code> and <code>Character.isWhitespace(fDocument.getChar(pos))</code> evaluates to <code>false</code>. * * @param position the first character position in <code>fDocument</code> to be considered * @param bound the first position in <code>fDocument</code> to not consider any more, with <code>bound</code> > <code>position</code>, or <code>UNBOUND</code> * @return the smallest position of a non-whitespace character in [<code>position</code>, <code>bound</code>), or <code>NOT_FOUND</code> if none can be found */ public int findNonWhitespaceForwardInAnyPartition(int position, int bound) { return scanForward(position, bound, fNonWS); }
/** * Finds the smallest position in <code>fDocument</code> such that the position is >= <code>position</code> * and < <code>bound</code> and <code>Character.isWhitespace(fDocument.getChar(pos))</code> evaluates to <code>false</code> * and the position is in the default partition. * * @param position the first character position in <code>fDocument</code> to be considered * @param bound the first position in <code>fDocument</code> to not consider any more, with <code>bound</code> > <code>position</code>, or <code>UNBOUND</code> * @return the smallest position of a non-whitespace character in [<code>position</code>, <code>bound</code>) that resides in a Java partition, or <code>NOT_FOUND</code> if none can be found */ public int findNonWhitespaceForward(int position, int bound) { return scanForward(position, bound, fNonWSDefaultPart); }
/** * Finds the smallest position in <code>fDocument</code> such that the position is >= <code>position</code> * and < <code>bound</code> and <code>Character.isWhitespace(fDocument.getChar(pos))</code> evaluates to <code>false</code>. * * @param position the first character position in <code>fDocument</code> to be considered * @param bound the first position in <code>fDocument</code> to not consider any more, with <code>bound</code> > <code>position</code>, or <code>UNBOUND</code> * @return the smallest position of a non-whitespace character in [<code>position</code>, <code>bound</code>), or <code>NOT_FOUND</code> if none can be found */ public int findNonWhitespaceForwardInAnyPartition(int position, int bound) { return scanForward(position, bound, fNonWS); }
/** * Finds the smallest position in <code>fDocument</code> such that the position is >= <code>position</code> * and < <code>bound</code> and <code>Character.isWhitespace(fDocument.getChar(pos))</code> evaluates to <code>false</code> * and the position is in the default partition. * * @param position the first character position in <code>fDocument</code> to be considered * @param bound the first position in <code>fDocument</code> to not consider any more, with <code>bound</code> > <code>position</code>, or <code>UNBOUND</code> * @return the smallest position of a non-whitespace character in [<code>position</code>, <code>bound</code>) that resides in a Java partition, or <code>NOT_FOUND</code> if none can be found */ public int findNonWhitespaceForward(int position, int bound) { return scanForward(position, bound, fNonWSDefaultPart); }
/** * Finds the lowest position in <code>fDocument</code> such that the position is >= <code>position</code> * and < <code>bound</code> and <code>fDocument.getChar(position) == ch</code> evaluates to <code>true</code> * and the position is in the default partition. * * @param position the first character position in <code>fDocument</code> to be considered * @param bound the first position in <code>fDocument</code> to not consider any more, with <code>bound</code> > <code>position</code>, or <code>UNBOUND</code> * @param ch the <code>char</code> to search for * @return the lowest position of <code>ch</code> in (<code>bound</code>, <code>position</code>] that resides in a Java partition, or <code>NOT_FOUND</code> if none can be found */ public int scanForward(int position, int bound, char ch) { return scanForward(position, bound, new CharacterMatch(ch)); }
/** * Finds the lowest position in <code>fDocument</code> such that the position is >= <code>position</code> * and < <code>bound</code> and <code>fDocument.getChar(position) == ch</code> evaluates to <code>true</code> * and the position is in the default partition. * * @param position the first character position in <code>fDocument</code> to be considered * @param bound the first position in <code>fDocument</code> to not consider any more, with <code>bound</code> > <code>position</code>, or <code>UNBOUND</code> * @param ch the <code>char</code> to search for * @return the lowest position of <code>ch</code> in (<code>bound</code>, <code>position</code>] that resides in a Java partition, or <code>NOT_FOUND</code> if none can be found */ public int scanForward(int position, int bound, char ch) { return scanForward(position, bound, new CharacterMatch(ch)); }
/** * Finds the lowest position in <code>fDocument</code> such that the position is >= <code>position</code> * and < <code>bound</code> and <code>fDocument.getChar(position) == ch</code> evaluates to <code>true</code> for at least one * ch in <code>chars</code> and the position is in the default partition. * * @param position the first character position in <code>fDocument</code> to be considered * @param bound the first position in <code>fDocument</code> to not consider any more, with <code>bound</code> > <code>position</code>, or <code>UNBOUND</code> * @param chars an array of <code>char</code> to search for * @return the lowest position of a non-whitespace character in [<code>position</code>, <code>bound</code>) that resides in a Java partition, or <code>NOT_FOUND</code> if none can be found */ public int scanForward(int position, int bound, char[] chars) { return scanForward(position, bound, new CharacterMatch(chars)); }
/** * Finds the lowest position in <code>fDocument</code> such that the position is >= <code>position</code> * and < <code>bound</code> and <code>fDocument.getChar(position) == ch</code> evaluates to <code>true</code> for at least one * ch in <code>chars</code> and the position is in the default partition. * * @param position the first character position in <code>fDocument</code> to be considered * @param bound the first position in <code>fDocument</code> to not consider any more, with <code>bound</code> > <code>position</code>, or <code>UNBOUND</code> * @param chars an array of <code>char</code> to search for * @return the lowest position of a non-whitespace character in [<code>position</code>, <code>bound</code>) that resides in a Java partition, or <code>NOT_FOUND</code> if none can be found */ public int scanForward(int position, int bound, char[] chars) { return scanForward(position, bound, new CharacterMatch(chars)); }
/** * Finds the lowest position in <code>fDocument</code> such that the position is >= <code>position</code> * and < <code>bound</code> and <code>fDocument.getChar(position) == ch</code> evaluates to <code>true</code> for at least one * ch in <code>chars</code> and the position is in the default partition. * * @param position the first character position in <code>fDocument</code> to be considered * @param bound the first position in <code>fDocument</code> to not consider any more, with <code>bound</code> > <code>position</code>, or <code>UNBOUND</code> * @param chars an array of <code>char</code> to search for * @return the lowest position of a non-whitespace character in [<code>position</code>, <code>bound</code>) that resides in a Java partition, or <code>NOT_FOUND</code> if none can be found */ public int scanForward(int position, int bound, char[] chars) { return scanForward(position, bound, new CharacterMatch(chars)); }
/** * Finds the lowest position in <code>fDocument</code> such that the position is >= <code>position</code> * and < <code>bound</code> and <code>fDocument.getChar(position) == ch</code> evaluates to <code>true</code> * and the position is in the default partition. * * @param position the first character position in <code>fDocument</code> to be considered * @param bound the first position in <code>fDocument</code> to not consider any more, with <code>bound</code> > <code>position</code>, or <code>UNBOUND</code> * @param ch the <code>char</code> to search for * @return the lowest position of <code>ch</code> in (<code>bound</code>, <code>position</code>] that resides in a Java partition, or <code>NOT_FOUND</code> if none can be found */ public int scanForward(int position, int bound, char ch) { return scanForward(position, bound, new CharacterMatch(ch)); }
int pos= scanForward(start, bound, fNonWSDefaultPart); if (pos == NOT_FOUND) return TokenEOF; pos= scanForward(pos + 1, bound, fNonIdent); if (pos == NOT_FOUND) to= bound == UNBOUND ? fDocument.getLength() : bound;
int pos= scanForward(start, bound, fNonWSDefaultPart); if (pos == NOT_FOUND) return TokenEOF; pos= scanForward(pos + 1, bound, fNonIdent); if (pos == NOT_FOUND) to= bound == UNBOUND ? fDocument.getLength() : bound;
int pos= offset; int length= max; int scanTo= scanner.scanForward(pos, length, '}'); if (scanTo == -1) scanTo= length; closingParen= scanner.scanForward(startScan, scanTo, ')'); if (closingParen == -1) break;
start -= 1; while (true) { start= scanForward(start + 1, bound, match); if (start == NOT_FOUND) return NOT_FOUND;
start -= 1; while (true) { start= scanForward(start + 1, bound, match); if (start == NOT_FOUND) return NOT_FOUND;
start -= 1; while (true) { start= scanForward(start + 1, bound, match); if (start == NOT_FOUND) return NOT_FOUND;
int pos= offset; int length= max; int scanTo= scanner.scanForward(pos, length, '}'); if (scanTo == -1) scanTo= length; while (true) { int startScan= closingParen + 1; closingParen= scanner.scanForward(startScan, scanTo, ')'); if (closingParen == -1) { if (openingParen != -1)
int pos= offset; int length= max; int scanTo= scanner.scanForward(pos, length, '}'); if (scanTo == -1) scanTo= length; while (true) { int startScan= closingParen + 1; closingParen= scanner.scanForward(startScan, scanTo, ')'); if (closingParen == -1) { if (openingParen != -1)