public final class QDiffNormalGenerator extends QDiffSequenceGenerator implements QDiffGeneratorFactory
| Modifier and Type | Field and Description |
|---|---|
static java.lang.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,
java.lang.String encoding,
java.io.Writer output)
Handles the addition of lines to source.
|
protected void |
change(int replaceStart,
int replaceEnd,
QSequenceLineCache replaceLines,
int replaceWithStart,
int replaceWithEnd,
QSequenceLineCache replaceWithLines,
java.lang.String encoding,
java.io.Writer output)
Handles a change of a range of lines in target to a range of lines in source.
|
QDiffGenerator |
createGenerator(java.util.Map properties) |
protected void |
delete(int deleteAt,
int deleteStart,
int deleteEnd,
QSequenceLineCache deleteLines,
java.lang.String encoding,
java.io.Writer output)
Handles a delete of lines from the target.
|
protected java.lang.String |
displayWhiteSpace(java.lang.String s) |
void |
generateDiffHeader(java.lang.String item,
java.lang.String leftInfo,
java.lang.String rightInfo,
java.io.Writer output) |
protected void |
processBlock(int sourceStartLine,
int sourceEndLine,
QSequenceLineCache sourceLines,
int targetStartLine,
int targetEndLine,
QSequenceLineCache targetLines,
java.lang.String encoding,
java.io.Writer output) |
protected void |
processBlock(QSequenceDifferenceBlock[] segment,
QSequenceLineCache sourceLines,
QSequenceLineCache targetLines,
java.lang.String encoding,
java.io.Writer output) |
static void |
setup() |
generateBinaryDiff, generateTextDiff, generateTextDiff, generateTextDiff, getEOL, getGutter, getHunkDelimiter, getProperties, getSimplifier, print, printLine, println, printlnpublic static final java.lang.String TYPE
public static void setup()
public void generateDiffHeader(java.lang.String item,
java.lang.String leftInfo,
java.lang.String rightInfo,
java.io.Writer output)
throws java.io.IOException
generateDiffHeader in interface QDiffGeneratorjava.io.IOExceptionprotected void processBlock(QSequenceDifferenceBlock[] segment, QSequenceLineCache sourceLines, QSequenceLineCache targetLines, java.lang.String encoding, java.io.Writer output) throws java.io.IOException
processBlock in class QDiffSequenceGeneratorjava.io.IOExceptionpublic QDiffGenerator createGenerator(java.util.Map properties)
createGenerator in interface QDiffGeneratorFactoryprotected void processBlock(int sourceStartLine,
int sourceEndLine,
QSequenceLineCache sourceLines,
int targetStartLine,
int targetEndLine,
QSequenceLineCache targetLines,
java.lang.String encoding,
java.io.Writer output)
throws java.io.IOException
java.io.IOExceptionprotected java.lang.String displayWhiteSpace(java.lang.String s)
protected void delete(int deleteAt,
int deleteStart,
int deleteEnd,
QSequenceLineCache deleteLines,
java.lang.String encoding,
java.io.Writer output)
throws java.io.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.java.io.IOExceptionprotected void add(int addAt,
int addStart,
int addEnd,
QSequenceLineCache addLines,
java.lang.String encoding,
java.io.Writer output)
throws java.io.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.java.io.IOExceptionprotected void change(int replaceStart,
int replaceEnd,
QSequenceLineCache replaceLines,
int replaceWithStart,
int replaceWithEnd,
QSequenceLineCache replaceWithLines,
java.lang.String encoding,
java.io.Writer output)
throws java.io.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 sourcejava.io.IOException