int lineEndSpaceWidth = getLineEndSpaceWidth(); int lineHeight = getLineHeight();
protected void drawLineBreakSelection(String line, int lineOffset, int paintX, int paintY, GC gc) {	Point selection = parent.internalGetSelection();	int lineLength = line.length();	int selectionStart = Math.max(0, selection.x - lineOffset);	int selectionEnd = selection.y - lineOffset;	int lineEndSpaceWidth = getLineEndSpaceWidth();	int lineHeight = getLineHeight();		if (selectionEnd == selectionStart || selectionEnd < 0 || selectionStart > lineLength || selectionEnd <= lineLength) {		return;	}		gc.setBackground(parent.getSelectionBackground());	gc.setForeground(parent.getSelectionForeground());	if ((parent.getStyle() & SWT.FULL_SELECTION) != 0) {		Rectangle rect = getClientArea();		gc.fillRectangle(paintX, paintY, rect.width - paintX, lineHeight);	} else {		boolean isWrappedLine = false;		if (parent.internalGetWordWrap()) {			StyledTextContent content = getContent();			int lineEnd = lineOffset + lineLength;			int lineIndex = content.getLineAtOffset(lineEnd);			// is the start offset of the next line the same as the end 			// offset of this line?			if (lineIndex < content.getLineCount() - 1 &&				content.getOffsetAtLine(lineIndex + 1) == lineEnd) {				isWrappedLine = true;			}		}		if (!isWrappedLine) {			// render the line break selection			gc.fillRectangle(paintX, paintY, lineEndSpaceWidth, lineHeight);		}	}	}