public abstract static class DiffPrint.Base extends Object
print_hunk
for each hunk. Various utility methods
are provided as well.Modifier and Type | Field and Description |
---|---|
protected int |
deletes |
protected Object[] |
file0
Set to the lines of the files being compared.
|
protected 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 PrintWriter |
outfile |
Modifier | Constructor and Description |
---|---|
protected |
Base(Object[] a,
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(String pre,
Object linbuf) |
void |
print_header(String filea,
String fileb)
Called to 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(Writer wtr) |
protected void |
setupOutput() |
protected PrintWriter outfile
protected UnaryPredicate ignore
protected int first0
protected int last0
protected int first1
protected int last1
protected int deletes
protected int inserts
protected void setupOutput()
public void print_script(Diff.change script)
protected Diff.change hunkfun(Diff.change hunk)
protected void analyze_hunk(Diff.change hunk)
public void print_header(String filea, String fileb)
protected abstract void print_hunk(Diff.change hunk)
protected void print_1_line(String pre, Object linbuf)
protected void print_number_range(char sepchar, int a, int b)
public static char change_letter(int inserts, int deletes)
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses