use of org.eclipse.che.ide.api.editor.text.RegionImpl in project che by eclipse.
the class ListLineTracker method getLineInformationOfOffset.
/* @see org.eclipse.jface.text.ILineTracker#getLineInformationOfOffset(int) */
public final Region getLineInformationOfOffset(int position) throws BadLocationException {
if (position > fTextLength)
throw new BadLocationException();
if (position == fTextLength) {
int size = fLines.size();
if (size == 0)
return new RegionImpl(0, 0);
Line l = (Line) fLines.get(size - 1);
return (l.delimiter != null ? new Line(fTextLength, 0) : new Line(fTextLength - l.length, l.length));
}
return getLineInformation(findLine(position));
}
Aggregations