com.jaxfront.core.util.diff
Class DiffToolPrint.Base

java.lang.Object
  extended by com.jaxfront.core.util.diff.DiffToolPrint.Base
Direct Known Subclasses:
DiffToolPrint.ContextPrint, DiffToolPrint.EdPrint, DiffToolPrint.NormalPrint
Enclosing class:
DiffToolPrint

public abstract static class DiffToolPrint.Base
extends java.lang.Object

A Base class for printing edit scripts produced by Diff. This class divides the change list into "hunks", and calls print_hunk for each hunk. Various utility methods are provided as well.


Method Summary
static char change_letter(int inserts, int deletes)
           
 void print_header(java.lang.String filea, java.lang.String fileb)
          Called to print the script header which identifies the files compared.
 void print_script(DiffTool.change script)
          Divide SCRIPT into pieces by calling HUNKFUN and print each piece with PRINTFUN.
 void setOutput(java.io.Writer wtr)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

change_letter

public static char change_letter(int inserts,
                                 int deletes)

print_header

public void print_header(java.lang.String filea,
                         java.lang.String fileb)
Called to print the script header which identifies the files compared. The default does nothing (except set output to system.out if not otherwise set). Derived style classes can override to print the files compared in the format for that style.


print_script

public void print_script(DiffTool.change script)
Divide SCRIPT into pieces by calling HUNKFUN and print each piece with PRINTFUN. Both functions take one arg, an edit script. PRINTFUN takes a subscript which belongs together (with a null link at the end) and prints it.


setOutput

public void setOutput(java.io.Writer wtr)