public abstract static class DiffPrint.Base
extends java.lang.Object
print_hunk
for each hunk. Various utility methods
are provided as well.Modifier and Type | Field and Description |
---|---|
protected int |
deletes |
protected java.lang.Object[] |
file0
Set to the lines of the files being compared.
|
protected java.lang.Object[] |
file1
Set to the lines of the files being compared.
|
protected int |
first0 |
protected int |
first1 |
protected UnaryPredicate |
ignore
Set to ignore certain kinds of lines when printing
an edit script.
|
protected int |
inserts |
protected int |
last0 |
protected int |
last1 |
protected java.io.PrintWriter |
outfile |
Modifier | Constructor and Description |
---|---|
protected |
DiffPrint.Base(java.lang.Object[] a,
java.lang.Object[] b) |
Modifier and Type | Method and Description |
---|---|
protected void |
analyze_hunk(Diff.change hunk)
Look at a hunk of edit script and report the range of lines in each file
that it applies to.
|
static char |
change_letter(int inserts,
int deletes) |
protected Diff.change |
hunkfun(Diff.change hunk)
Called with the tail of the script
and returns the last link that belongs together with the start
of the tail.
|
protected void |
print_1_line(java.lang.String pre,
java.lang.Object linbuf) |
protected void |
print_header(java.lang.String filea,
java.lang.String fileb)
Print the script header which identifies the files compared.
|
protected abstract void |
print_hunk(Diff.change hunk) |
protected void |
print_number_range(char sepchar,
int a,
int b)
Print a pair of line numbers with SEPCHAR, translated for file FILE.
|
void |
print_script(Diff.change script)
Divide SCRIPT into pieces by calling HUNKFUN and
print each piece with PRINTFUN.
|
void |
setOutput(java.io.Writer wtr) |
void |
setupOutput() |
protected java.io.PrintWriter outfile
protected UnaryPredicate ignore
protected java.lang.Object[] file0
protected java.lang.Object[] file1
protected int first0
protected int last0
protected int first1
protected int last1
protected int deletes
protected int inserts
protected DiffPrint.Base(java.lang.Object[] a, java.lang.Object[] b)
public void setOutput(java.io.Writer wtr)
public void setupOutput()
public void print_script(Diff.change script)
protected Diff.change hunkfun(Diff.change hunk)
protected void analyze_hunk(Diff.change hunk)
protected void print_header(java.lang.String filea, java.lang.String fileb)
protected abstract void print_hunk(Diff.change hunk)
protected void print_1_line(java.lang.String pre, java.lang.Object linbuf)
protected void print_number_range(char sepchar, int a, int b)
public static char change_letter(int inserts, int deletes)
Copyright © 2013. All Rights Reserved.