int topLine= text.getTopIndex();
int rangeTopLine= getWidgetLineNumber(lineRange.getStartLine());
int topDelta= Math.max(topLine - rangeTopLine, 0);
Rectangle size= text.getClientArea();
Rectangle trim= text.computeTrim(0, 0, 0, 0);
int height= size.height - trim.height;
int lines= JFaceTextUtil.getLineIndex(text, height) - text.getTopIndex();
int bottomLine= topLine + lines;