private void createInlineHighlighter(@NotNull DiffFragment fragment, @NotNull Side side) { int start = side.getStartOffset(fragment); int end = side.getEndOffset(fragment); TextDiffType type = DiffUtil.getDiffType(fragment); int startOffset = side.getStartOffset(myFragment); start += startOffset; end += startOffset; Editor editor = myViewer.getEditor(side); myHighlighters.addAll(DiffDrawUtil.createInlineHighlighter(editor, start, end, type)); }
private void createInnerHighlighter(@NotNull ThreeSide side) { if (isResolved(side)) return; if (myInnerFragments == null) return; Editor editor = myViewer.getEditor(side); int start = DiffUtil.getLinesRange(editor.getDocument(), getStartLine(side), getEndLine(side)) .getStartOffset(); for (MergeWordFragment fragment : myInnerFragments) { int innerStart = start + fragment.getStartOffset(side); int innerEnd = start + fragment.getEndOffset(side); myInnerHighlighters.addAll( DiffDrawUtil.createInlineHighlighter(editor, innerStart, innerEnd, getDiffType())); } }