com.starteam.diff
Class HTMLInterleavedDiffWriter

java.lang.Object
  extended by com.starteam.diff.EditListWriter
      extended by com.starteam.diff.HTMLDiffWriter
          extended by com.starteam.diff.HTMLTableDiffWriter
              extended by com.starteam.diff.HTMLInterleavedDiffWriter

public class HTMLInterleavedDiffWriter
extends HTMLTableDiffWriter

Writes a simple HTML page showing the differences between two text files.


Field Summary
 
Fields inherited from class com.starteam.diff.HTMLDiffWriter
DEFAULT_SPACES_PER_TAB
 
Constructor Summary
HTMLInterleavedDiffWriter(ParsedCharSequence source, ParsedCharSequence target, java.io.File output)
          Constructs an interleaved HTMLDiffWriter, writing output to the specified file.
HTMLInterleavedDiffWriter(ParsedCharSequence source, ParsedCharSequence target, java.io.Writer output)
          Constructs an interleaved HTMLDiffWriter, writing output to the specified Writer.
 
Method Summary
static void diff(java.io.File source, java.io.File target, DiffCompare compare, java.io.File output)
          Compares two text files, and generates an HTML file describing the differences.
static void diff(java.io.File source, java.io.File target, java.io.File output)
          Compares two text files, and generates an HTML file describing the differences.
static void diff(java.io.File source, java.io.File target, int compareFlags, java.io.File output)
          Compares two text files, and generates an HTML file describing the differences.
 
Methods inherited from class com.starteam.diff.HTMLTableDiffWriter
deleteLines, insertLines, replaceLines, unchangedLines
 
Methods inherited from class com.starteam.diff.HTMLDiffWriter
finish, getAddedSymbolHTML, getApplicationFooterHTML, getApplicationHeaderHTML, getCRHTML, getDeletedSymbolHTML, getEmbedDefaultStyles, getGotoBlankHTML, getGotoBottomHTML, getGotoFirstDiffHTML, getGotoLastDiffHTML, getGotoNextDiffHTML, getGotoPrevDiffHTML, getGotoTopHTML, getInlineDeleteMarkHTML, getInlineInsertMarkHTML, getLFHTML, getNavigateOnEveryChangedLine, getNumContextLines, getPageBaseURL, getPageTitle, getReplacedSymbolHTML, getShowEOLs, getShowInlineDiffs, getShowLineNumbers, getShowUnchangedLines, getSourceFileHTML, getSourceFileURL, getSpacesPerTab, getStyleSheetURL, getTargetFileHTML, getTargetFileURL, getUnchangedSymbolHTML, setAddedSymbolHTML, setApplicationFooterHTML, setApplicationHeaderHTML, setCRHTML, setDeletedSymbolHTML, setEmbedDefaultStyles, setGotoBlankHTML, setGotoBottomHTML, setGotoFirstDiffHTML, setGotoLastDiffHTML, setGotoNextDiffHTML, setGotoPrevDiffHTML, setGotoTopHTML, setInlineDeleteMarkHTML, setInlineInsertMarkHTML, setLFHTML, setNavigateOnEveryChangedLine, setNumContextLines, setPageBaseURL, setPageTitle, setReplacedSymbolHTML, setShowEOLs, setShowInlineDiffs, setShowLineNumbers, setShowUnchangedLines, setSourceFileHTML, setSourceFileURL, setSpacesPerTab, setStyleSheetURL, setTargetFileHTML, setTargetFileURL, setUnchangedSymbolHTML, simpleDiff, start
 
Methods inherited from class com.starteam.diff.EditListWriter
write
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTMLInterleavedDiffWriter

public HTMLInterleavedDiffWriter(ParsedCharSequence source,
                                 ParsedCharSequence target,
                                 java.io.File output)
                          throws java.io.IOException
Constructs an interleaved HTMLDiffWriter, writing output to the specified file.

Parameters:
source - A parsed representation of the source text file.
target - A parsed representation of the target text file.
output - The output file to generate.
Throws:
java.io.IOException
See Also:
ParsedCharSequence

HTMLInterleavedDiffWriter

public HTMLInterleavedDiffWriter(ParsedCharSequence source,
                                 ParsedCharSequence target,
                                 java.io.Writer output)
Constructs an interleaved HTMLDiffWriter, writing output to the specified Writer.

Parameters:
source - A parsed representation of the source text file.
target - A parsed representation of the target text file.
output - The output stream.
See Also:
ParsedCharSequence
Method Detail

diff

public static void diff(java.io.File source,
                        java.io.File target,
                        java.io.File output)
                 throws java.io.FileNotFoundException,
                        java.io.IOException,
                        DiffException
Compares two text files, and generates an HTML file describing the differences. The text of the two files is drawn in an interleaved fashion.

Uses a default text comparison algorithm: leading and trailing whitespace is ignored, and sequential whitespace characters within a line are treated as equivalent to a single space character.

Parameters:
source - The source text file.
target - The target text file.
output - The output file to generate.
Throws:
java.io.FileNotFoundException
java.io.IOException
DiffException

diff

public static void diff(java.io.File source,
                        java.io.File target,
                        int compareFlags,
                        java.io.File output)
                 throws java.io.FileNotFoundException,
                        java.io.IOException,
                        DiffException
Compares two text files, and generates an HTML file describing the differences. The text of the two files is drawn in an interleaved fashion. Uses a text comparison algorithm defined by via a set of BasicCompare flags (e.g., LEADING_WS_IGNORE, INTERIOR_WS_EQUIV, and so on).

Parameters:
source - The source text file.
target - The target text file.
compareFlags - Flags that define the text comparison algorithm.
output - The output file to generate.
Throws:
java.io.FileNotFoundException
java.io.IOException
DiffException
See Also:
BasicCompare

diff

public static void diff(java.io.File source,
                        java.io.File target,
                        DiffCompare compare,
                        java.io.File output)
                 throws java.io.FileNotFoundException,
                        java.io.IOException,
                        DiffException
Compares two text files, and generates an HTML file describing the differences. The text of the two files is drawn in an interleaved fashion. Uses a text comparison algorithm defined via a DiffCompare interface.

Parameters:
source - The source text file.
target - The target text file.
compare - Text comparison algorithm.
output - The output file to generate.
Throws:
java.io.FileNotFoundException
java.io.IOException
DiffException
See Also:
DiffCompare


StarTeam SDK 14.0, Build 21
Copyright © 2003-2012 Borland Software Corporation. All rights reserved.