use of com.intellij.openapi.diff.impl.fragments.LineFragment in project intellij-community by JetBrains.
the class SimpleDiffPanelState method addMarkup.
private LineBlocks addMarkup(final List<LineFragment> lines) {
ApplicationManager.getApplication().runWriteAction(() -> {
final FragmentHighlighterImpl fragmentHighlighter = new FragmentHighlighterImpl(myAppender1, myAppender2);
for (Iterator<LineFragment> iterator = lines.iterator(); iterator.hasNext(); ) {
LineFragment line = iterator.next();
fragmentHighlighter.setIsLast(!iterator.hasNext());
line.highlight(fragmentHighlighter);
}
});
ArrayList<LineFragment> allLineFragments = new ArrayList<>();
for (LineFragment lineFragment : lines) {
allLineFragments.add(lineFragment);
lineFragment.addAllDescendantsTo(allLineFragments);
}
myFragmentList = FragmentListImpl.fromList(allLineFragments);
return LineBlocks.fromLineFragments(allLineFragments);
}
Aggregations