protected abstract StyledTextEvent getLineStyleData(int lineOffset, String line);
StyledTextEvent getLineStyleData(StyledTextEvent event, int lineOffset, String line) { int lineLength = line.length();  if (event.styles != null && getWordWrap()) { event.styles = getVisualLineStyleData(event.styles, lineOffset, lineLength); } if (event.styles == null) { event.styles = new StyleRange[0]; } else if (isBidi()) { GC gc = getGC(); if (StyledTextBidi.isLigated(gc)) {        StyledTextBidi bidi = new StyledTextBidi(gc, line, new int[] {0, lineLength}); for (int i=0; i<event.styles.length; i++) { StyleRange range = event.styles[i]; StyleRange newRange = null; int relativeStart = range.start - lineOffset; if (relativeStart >= 0) { int startLigature = bidi.getLigatureStartOffset(relativeStart); if (startLigature != relativeStart) { newRange = (StyleRange) range.clone(); range = event.styles[i] = newRange; range.start = range.start - (relativeStart - startLigature); range.length = range.length + (relativeStart - startLigature); } } int rangeEnd = range.start + range.length; int relativeEnd = rangeEnd - lineOffset - 1; if (relativeEnd < lineLength) { int endLigature = bidi.getLigatureEndOffset(relativeEnd); if (endLigature != relativeEnd) { if (newRange == null) { newRange = (StyleRange) range.clone(); range = event.styles[i] = newRange; } range.length = range.length + (endLigature - relativeEnd); } } } } disposeGC(gc); } return event; }
protected abstract StyledTextEvent getLineStyleData(int lineOffset, String line);