Verified Owner
Top Description Fields Constructors Methods
org.jabref.gui.mergeentries.threewaymerge.diffhighlighter

public final Class UnifiedDiffHighlighter

extends DiffHighlighter
Class Inheritance
Imports
java.util.ArrayList, .List, .Optional, org.jabref.gui.mergeentries.threewaymerge.DiffMethod, com.github.difflib.DiffUtils, com.github.difflib.patch.AbstractDelta, org.fxmisc.richtext.StyleClassedTextArea

A diff highlighter in which differences of type com.github.difflib.patch.DeltaType#CHANGE are unified and represented by an insertion and deletion in the target text view. Normal addition and deletion are kept as they are.

Field Summary

Inherited from org.jabref.gui.mergeentries.threewaymerge.diffhighlighter.DiffHighlighter:
diffMethodsourceTextviewtargetTextview

Constructor Summary

AccessConstructor and Description
public
UnifiedDiffHighlighter(StyleClassedTextArea sourceTextview, StyleClassedTextArea targetTextview, DiffMethod diffMethod)

Method Summary

Modifier and TypeMethod and Description
private void
appendToTextArea(StyleClassedTextArea textArea, String text, String styleClass)

private Optional<DiffHighlighter.Change>
findChange(int position, List<DiffHighlighter.Change> changeList)

public void
Inherited from org.jabref.gui.mergeentries.threewaymerge.diffhighlighter.DiffHighlighter:
getDiffMethodgetSeparatorjoinsplitString

Constructor Detail

UnifiedDiffHighlighterback to summary
public UnifiedDiffHighlighter(StyleClassedTextArea sourceTextview, StyleClassedTextArea targetTextview, DiffMethod diffMethod)

Method Detail

appendToTextAreaback to summary
private void appendToTextArea(StyleClassedTextArea textArea, String text, String styleClass)
findChangeback to summary
private Optional<DiffHighlighter.Change> findChange(int position, List<DiffHighlighter.Change> changeList)
highlightback to summary
public void highlight()

Implements abstract org.jabref.gui.mergeentries.threewaymerge.diffhighlighter.DiffHighlighter.highlight.

Annotations
@Override