Top Inners Fields Constructors Methods
org.jabref.gui.mergeentries.newmergedialog.diffhighlighter

public abstract sealed Class DiffHighlighter

extends Object
permits SplitDiffHighlighter, UnifiedDiffHighlighter
Class Inheritance
Known Direct Subclasses
org.jabref.gui.mergeentries.newmergedialog.diffhighlighter.SplitDiffHighlighter, org.jabref.gui.mergeentries.newmergedialog.diffhighlighter.UnifiedDiffHighlighter
Imports
java.util.Arrays, .List, .Objects, org.jabref.gui.mergeentries.newmergedialog.DiffMethod, org.fxmisc.richtext.StyleClassedTextArea

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
pack-priv static record
pack-priv static enum

Field Summary

Modifier and TypeField and Description
protected DiffMethod
protected final org.fxmisc.richtext.StyleClassedTextArea
protected final org.fxmisc.richtext.StyleClassedTextArea

Constructor Summary

AccessConstructor and Description
public
DiffHighlighter(org.fxmisc.richtext.StyleClassedTextArea sourceTextview, org.fxmisc.richtext.StyleClassedTextArea targetTextview, DiffMethod diffMethod)

Method Summary

Modifier and TypeMethod and Description
public DiffMethod
public String
pack-priv abstract void
protected String
join(List<String> stringList)

private void
protected List<String>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

diffMethodback to summary
protected DiffMethod diffMethod
sourceTextviewback to summary
protected final org.fxmisc.richtext.StyleClassedTextArea sourceTextview
targetTextviewback to summary
protected final org.fxmisc.richtext.StyleClassedTextArea targetTextview

Constructor Detail

DiffHighlighterback to summary
public DiffHighlighter(org.fxmisc.richtext.StyleClassedTextArea sourceTextview, org.fxmisc.richtext.StyleClassedTextArea targetTextview, DiffMethod diffMethod)

Method Detail

getDiffMethodback to summary
public DiffMethod getDiffMethod()
getSeparatorback to summary
public String getSeparator()
highlightback to summary
pack-priv abstract void highlight()
joinback to summary
protected String join(List<String> stringList)
setDiffMethodback to summary
private void setDiffMethod(DiffMethod diffMethod)
splitStringback to summary
protected List<String> splitString(String str)
org.jabref.gui.mergeentries.newmergedialog.diffhighlighter back to summary

public final Enum DiffHighlighter.BasicDiffMethod

extends Enum<DiffHighlighter.BasicDiffMethod>
implements DiffMethod
Class Inheritance
All Implemented Interfaces
org.jabref.gui.mergeentries.newmergedialog.DiffMethod

Field Summary

Modifier and TypeField and Description
public static final DiffHighlighter.BasicDiffMethod
public static final DiffHighlighter.BasicDiffMethod
private final String
public static final DiffHighlighter.BasicDiffMethod

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public String
public static DiffHighlighter.BasicDiffMethod
public static DiffHighlighter.BasicDiffMethod[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

CHARSback to summary
public static final DiffHighlighter.BasicDiffMethod CHARS
COMMAback to summary
public static final DiffHighlighter.BasicDiffMethod COMMA
separatorback to summary
private final String separator
WORDSback to summary
public static final DiffHighlighter.BasicDiffMethod WORDS

Constructor Detail

BasicDiffMethodback to summary
private BasicDiffMethod(String separator)

Method Detail

separatorback to summary
public String separator()

Implements org.jabref.gui.mergeentries.newmergedialog.DiffMethod.separator.

Annotations
@Override
valueOfback to summary
public static DiffHighlighter.BasicDiffMethod valueOf(String name)
valuesback to summary
public static DiffHighlighter.BasicDiffMethod[] values()
org.jabref.gui.mergeentries.newmergedialog.diffhighlighter back to summary

pack-priv final Record DiffHighlighter.Change

extends Record
Class Inheritance
Record Components
position:int 
spanSize:int 
type:DiffHighlighter.ChangeType 

Field Summary

Modifier and TypeField and Description
private final int
position

Record Component accessed by position().

private final int
spanSize

Record Component accessed by spanSize().

private final DiffHighlighter.ChangeType
type

Record Component accessed by type().

Constructor Summary

AccessConstructor and Description
pack-priv
Change(int position, int spanSize, DiffHighlighter.ChangeType type)

Method Summary

Modifier and TypeMethod and Description
public final boolean
equals(Object
the reference object with which to compare.
o
)

Implements abstract java.lang.Record.equals.

Indicates whether some other object is "equal to" this one.

public final int
hashCode()

Implements abstract java.lang.Record.hashCode.

Returns a hash code value for the record.

public int
position()

Record Component getter of position.

public int
spanSize()

Record Component getter of spanSize.

public final String
toString()

Implements abstract java.lang.Record.toString.

Returns a string representation of the record.

public DiffHighlighter.ChangeType
type()

Record Component getter of type.

Field Detail

positionback to summary
private final int position

Record Component accessed by position().

spanSizeback to summary
private final int spanSize

Record Component accessed by spanSize().

typeback to summary
private final DiffHighlighter.ChangeType type

Record Component accessed by type().

Constructor Detail

Changeback to summary
pack-priv Change(int position, int spanSize, DiffHighlighter.ChangeType type)

Method Detail

equalsback to summary
public final boolean equals(Object o)

Implements abstract java.lang.Record.equals.

Doc from java.lang.Record.equals.

Indicates whether some other object is "equal to" this one. In addition to the general contract of Object.equals, record classes must further obey the invariant that when a record instance is "copied" by passing the result of the record component accessor methods to the canonical constructor, as follows:

    R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
Parameters
o:Object

the reference object with which to compare.

Returns:boolean

true if this record is equal to the argument; false otherwise.

hashCodeback to summary
public final int hashCode()

Implements abstract java.lang.Record.hashCode.

Doc from java.lang.Record.hashCode.

Returns a hash code value for the record. Obeys the general contract of Object.hashCode. For records, hashing behavior is constrained by the refined contract of Record.equals, so that any two records created from the same components must have the same hash code.

Returns:int

a hash code value for this record.

positionback to summary
public int position()

Record Component getter of position.

spanSizeback to summary
public int spanSize()

Record Component getter of spanSize.

toStringback to summary
public final String toString()

Implements abstract java.lang.Record.toString.

Doc from java.lang.Record.toString.

Returns a string representation of the record. In accordance with the general contract of Object#toString(), the toString method returns a string that "textually represents" this record. The result should be a concise but informative representation that is easy for a person to read.

In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves.

Returns:String

a string representation of the object.

typeback to summary
public DiffHighlighter.ChangeType type()

Record Component getter of type.

org.jabref.gui.mergeentries.newmergedialog.diffhighlighter back to summary

pack-priv final Enum DiffHighlighter.ChangeType

extends Enum<DiffHighlighter.ChangeType>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final DiffHighlighter.ChangeType
public static final DiffHighlighter.ChangeType
public static final DiffHighlighter.ChangeType

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static DiffHighlighter.ChangeType
public static DiffHighlighter.ChangeType[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

ADDITIONback to summary
public static final DiffHighlighter.ChangeType ADDITION
CHANGE_DELETIONback to summary
public static final DiffHighlighter.ChangeType CHANGE_DELETION
DELETIONback to summary
public static final DiffHighlighter.ChangeType DELETION

Constructor Detail

ChangeTypeback to summary
private ChangeType()

Method Detail

valueOfback to summary
public static DiffHighlighter.ChangeType valueOf(String name)
valuesback to summary
public static DiffHighlighter.ChangeType[] values()