drawLineSelectionBackground(line, lineOffset, styles, paintY, gc, bidi); } if (selectionStart != selectionEnd && ((selectionStart >= lineOffset && selectionStart < lineOffset + lineLength) || (selectionStart < lineOffset && selectionEnd > lineOffset))) { styles = mergeSelectionLineStyles(styles);
drawLineBreakSelection(line, lineOffset, styles, paintY, gc, bidi); if ((selectionStart >= lineOffset && selectionStart < lineOffset + lineLength) || (selectionStart < lineOffset && selectionEnd > lineOffset)) { styles = mergeSelectionLineStyles(styles); }
void drawLine(String line, int lineIndex, int paintY, GC gc, Color widgetBackground, Color widgetForeground, boolean clearBackground) {	int lineOffset = getContent().getOffsetAtLine(lineIndex);	int lineLength = line.length();	Point selection = getSelection();	int selectionStart = selection.x;	int selectionEnd = selection.y;	StyleRange[] styles = new StyleRange[0];	Color lineBackground = null;	StyledTextEvent event = getLineStyleData(lineOffset, line);	StyledTextBidi bidi = null;		if (event != null) {		styles = event.styles;	}	if (isBidi()) {		setLineFont(gc, SWT.NORMAL);		bidi = getStyledTextBidi(line, lineOffset, gc, styles);	}	event = getLineBackgroundData(lineOffset, line);	if (event != null) {		lineBackground = event.lineBackground;	}	if (lineBackground == null) {		lineBackground = widgetBackground;	}	if (clearBackground &&		(isFullLineSelection() == false || 		 selectionStart > lineOffset || 		 selectionEnd <= lineOffset + lineLength)) {		// draw background if full selection is off or if line is not 		// completely selected		gc.setBackground(lineBackground);		gc.setForeground(lineBackground);		gc.fillRectangle(leftMargin, paintY, getClientArea().width, lineHeight);	}	if (selectionStart != selectionEnd) {		drawLineSelectionBackground(line, lineOffset, styles, paintY, gc, bidi);	}	if (selectionStart != selectionEnd && 		((selectionStart >= lineOffset && selectionStart < lineOffset + lineLength) || 		 (selectionStart < lineOffset && selectionEnd > lineOffset))) {		styles = mergeSelectionLineStyles(styles);	}	drawStyledLine(line, lineOffset, 0, styles, 0, paintY, gc, lineBackground, widgetForeground, bidi);}