bmsi.util
Class DiffPrint.ContextPrint

java.lang.Object
  extended by bmsi.util.DiffPrint.Base
      extended by bmsi.util.DiffPrint.ContextPrint
Direct Known Subclasses:
DiffPrint.UnifiedPrint
Enclosing class:
DiffPrint

public static class DiffPrint.ContextPrint
extends DiffPrint.Base

Prints an edit script in context diff format. This and its 'unified' variation is used for source code patches.


Field Summary
protected  int context
           
 
Fields inherited from class bmsi.util.DiffPrint.Base
deletes, file0, file1, first0, first1, ignore, inserts, last0, last1, outfile
 
Constructor Summary
DiffPrint.ContextPrint(Object[] a, Object[] b)
           
 
Method Summary
protected  void print_context_label(String mark, File inf, String label)
           
protected  void print_function(Object[] file, int start)
           
 void print_header(String filea, String fileb)
          Called to print the script header which identifies the files compared.
protected  void print_hunk(Diff.change hunk)
           
 
Methods inherited from class bmsi.util.DiffPrint.Base
analyze_hunk, change_letter, hunkfun, print_1_line, print_number_range, print_script, setOutput, setupOutput
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

context

protected int context
Constructor Detail

DiffPrint.ContextPrint

public DiffPrint.ContextPrint(Object[] a,
                              Object[] b)
Method Detail

print_context_label

protected void print_context_label(String mark,
                                   File inf,
                                   String label)

print_header

public void print_header(String filea,
                         String fileb)
Description copied from class: DiffPrint.Base
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.

Overrides:
print_header in class DiffPrint.Base

print_function

protected void print_function(Object[] file,
                              int start)

print_hunk

protected void print_hunk(Diff.change hunk)
Specified by:
print_hunk in class DiffPrint.Base


Copyright © 2004-2012. All Rights Reserved.