StyledTextEvent event = getLineEvent(lineOffset, line);
StyledTextEvent event = sendLineEvent(LineGetSegments, lineOffset, line);
int [] getBidiSegments(int lineOffset, String line) {	if (isListening(LineGetSegments) == false) {		return getBidiSegmentsCompatibility(line, lineOffset);	}	StyledTextEvent event = getLineEvent(lineOffset, line);	int lineLength = line.length();	int[] segments;	notifyListeners(LineGetSegments, event);	if (event.segments == null || event.segments.length == 0) {		segments = new int[] {0, lineLength};	}	else {		int segmentCount = event.segments.length;				// test segment index consistency		if (event.segments[0] != 0) {			SWT.error(SWT.ERROR_INVALID_ARGUMENT);		} 			for (int i = 1; i < segmentCount; i++) {			if (event.segments[i] <= event.segments[i - 1] || event.segments[i] > lineLength) {				SWT.error(SWT.ERROR_INVALID_ARGUMENT);			} 			}		// ensure that last segment index is line end offset		if (event.segments[segmentCount - 1] != lineLength) {			segments = new int[segmentCount + 1];			System.arraycopy(event.segments, 0, segments, 0, segmentCount);			segments[segmentCount] = lineLength;		}		else {			segments = event.segments;		}	}	return segments;}