public final class QDiffNormalGenerator extends QDiffSequenceGenerator implements QDiffGeneratorFactory
Modifier and Type | Field and Description |
---|---|
static String |
TYPE |
EOL_PROPERTY, GUTTER_PROPERTY, HUNK_DELIMITER, IGNORE_ALL_SPACE, IGNORE_EOL_PROPERTY, IGNORE_SPACE_CHANGE, IGNORE_SPACE_PROPERTY, WHITESPACE_PROPERTY
Modifier and Type | Method and Description |
---|---|
protected void |
add(int addAt,
int addStart,
int addEnd,
QSequenceLineCache addLines,
String encoding,
Writer output)
Handles the addition of lines to source.
|
protected void |
change(int replaceStart,
int replaceEnd,
QSequenceLineCache replaceLines,
int replaceWithStart,
int replaceWithEnd,
QSequenceLineCache replaceWithLines,
String encoding,
Writer output)
Handles a change of a range of lines in target to a range of lines in source.
|
QDiffGenerator |
createGenerator(Map properties) |
protected void |
delete(int deleteAt,
int deleteStart,
int deleteEnd,
QSequenceLineCache deleteLines,
String encoding,
Writer output)
Handles a delete of lines from the target.
|
protected String |
displayWhiteSpace(String s) |
void |
generateDiffHeader(String item,
String leftInfo,
String rightInfo,
Writer output) |
protected void |
processBlock(int sourceStartLine,
int sourceEndLine,
QSequenceLineCache sourceLines,
int targetStartLine,
int targetEndLine,
QSequenceLineCache targetLines,
String encoding,
Writer output) |
protected void |
processBlock(QSequenceDifferenceBlock[] segment,
QSequenceLineCache sourceLines,
QSequenceLineCache targetLines,
OutputStream output) |
protected void |
processBlock(QSequenceDifferenceBlock[] segment,
QSequenceLineCache sourceLines,
QSequenceLineCache targetLines,
String encoding,
Writer output) |
static void |
setup() |
generateBinaryDiff, generateTextDiff, generateTextDiff, generateTextDiff, generateTextDiff, generateTextDiff, getEOL, getGutter, getHunkDelimiter, getProperties, getSimplifier, print, print, printLine, println, println, println, println
public static final String TYPE
public static void setup()
public void generateDiffHeader(String item, String leftInfo, String rightInfo, Writer output) throws IOException
generateDiffHeader
in interface QDiffGenerator
IOException
protected void processBlock(QSequenceDifferenceBlock[] segment, QSequenceLineCache sourceLines, QSequenceLineCache targetLines, String encoding, Writer output) throws IOException
processBlock
in class QDiffSequenceGenerator
IOException
protected void processBlock(QSequenceDifferenceBlock[] segment, QSequenceLineCache sourceLines, QSequenceLineCache targetLines, OutputStream output) throws IOException
processBlock
in class QDiffSequenceGenerator
IOException
public QDiffGenerator createGenerator(Map properties)
createGenerator
in interface QDiffGeneratorFactory
protected void processBlock(int sourceStartLine, int sourceEndLine, QSequenceLineCache sourceLines, int targetStartLine, int targetEndLine, QSequenceLineCache targetLines, String encoding, Writer output) throws IOException
IOException
protected void delete(int deleteAt, int deleteStart, int deleteEnd, QSequenceLineCache deleteLines, String encoding, Writer output) throws IOException
deleteAt
- the line where the lines would have appeared in the source (0 based)deleteStart
- first line deleted from target (0 based).deleteEnd
- last line deleted from target (0 based).deleteLines
- all the lines from the target file. Could be accessed with deleteStart
and
deleteEnd
to identify the deleted lines.IOException
protected void add(int addAt, int addStart, int addEnd, QSequenceLineCache addLines, String encoding, Writer output) throws IOException
addAt
- the line where the new lines would be added to target (0 based)addStart
- the first line added from source (0 based)addEnd
- the last line added from source (0 based)addLines
- all the lines from the source file. Could be accessed with addStart
and
addEnd
to identify the added lines.IOException
protected void change(int replaceStart, int replaceEnd, QSequenceLineCache replaceLines, int replaceWithStart, int replaceWithEnd, QSequenceLineCache replaceWithLines, String encoding, Writer output) throws IOException
replaceStart
- the first line in target that will be replaced (0 based)replaceEnd
- the last line in target that will be replaced (0 based)replaceLines
- all the lines in targetreplaceWithStart
- the first line in source to that will replace the lines in target (0 based)replaceWithEnd
- the last line in source to that will replace the lines in target (0 based)replaceWithLines
- all the lines in sourceIOException
Copyright © 2018. All rights reserved.