lines[0] = (pixel0 * maxLines) / rulerLength;
lines[1] = (pixel1 * maxLines) / rulerLength;
if (fTextViewer instanceof ITextViewerExtension5) {
ITextViewerExtension5 extension = (ITextViewerExtension5) fTextViewer;
lines[0] = extension.widgetLine2ModelLine(lines[0]);
lines[1] = extension.widgetLine2ModelLine(lines[1]);
} else {
try {
IRegion visible = fTextViewer.getVisibleRegion();
int lineNumber = fTextViewer.getDocument().getLineOfOffset(visible.getOffset());