Lines Matching refs:seg

638         Segment seg = SegmentCache.getSharedSegment();
639 doc.getText(lineStart, lineEnd - lineStart, seg);
640 if(seg.count > 0) {
642 words.setText(seg);
643 int wordPosition = seg.offset + offs - lineStart;
648 offs = lineStart + words.previous() - seg.offset;
650 SegmentCache.releaseSharedSegment(seg);
672 Segment seg = SegmentCache.getSharedSegment();
673 doc.getText(lineStart, lineEnd - lineStart, seg);
674 if(seg.count > 0) {
676 words.setText(seg);
677 int wordPosition = offs - lineStart + seg.offset;
681 offs = lineStart + words.following(wordPosition) - seg.offset;
683 SegmentCache.releaseSharedSegment(seg);
727 Segment seg = SegmentCache.getSharedSegment();
728 doc.getText(lineStart, lineEnd - lineStart, seg);
730 words.setText(seg);
731 if ((first && (words.first() == (seg.offset + offs - lineStart))) &&
732 (! Character.isWhitespace(seg.array[words.first()]))) {
736 int wordPosition = words.following(seg.offset + offs - lineStart);
738 (wordPosition >= seg.offset + seg.count)) {
745 char ch = seg.array[wordPosition];
747 return lineStart + wordPosition - seg.offset;
755 offs = lineStart + wordPosition - seg.offset;
760 SegmentCache.releaseSharedSegment(seg);
805 Segment seg = SegmentCache.getSharedSegment();
806 doc.getText(lineStart, lineEnd - lineStart, seg);
808 words.setText(seg);
809 if (words.following(seg.offset + offs - lineStart) == BreakIterator.DONE) {
813 if (wordPosition == (seg.offset + offs - lineStart)) {
824 char ch = seg.array[wordPosition];
826 return lineStart + wordPosition - seg.offset;
834 return lineStart + wordPosition - seg.offset;
836 SegmentCache.releaseSharedSegment(seg);