| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private static final Pattern |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static List | generateOriginalAndDiff(List<String>
Original file content original, List<String> revised file content revised)Compare the differences between two files and return to the original file and diff format (This method compares the original file with the comparison file to obtain a diff, and inserts the diff into the corresponding position of the original file. |
| public static List | generateOriginalAndDiff(List<String>
Original file content original, List<String> revised file content revised, String Original file name originalFileName, String revised file name revisedFileName)Compare the differences between two files and return to the original file and diff format (This method compares the original file with the comparison file to obtain a diff, and inserts the diff into the corresponding position of the original file. |
| public static List | Returns: List of strings representing the Unified Diff representation of the Patch argument.- Filename of the original (unrevised file) originalFileName, String - Filename of the revised file revisedFileName, List<String> - Lines of the original file originalLines, Patch<String> - Patch created by the diff() function patch, int - number of lines of context output around each difference in the file. contextSize)generateUnifiedDiff takes a Patch and some other arguments, returning the Unified Diff format text representing the Patch. |
| private static List | Returns: list of String lines of code.- the Delta to output delta)getDeltaText returns the lines to be added to the Unified Diff text from the Delta parameter. |
| private static List | |
| private static Map | |
| private static void | |
| private static List | |
| private static void | |
| public static Patch | Returns: the patch with deltas.the text in unified format diff)Parse the given text in unified format and creates the list of deltas for it. |
| private static List | processDeltas(List<String>
- the lines of the original file origLines, List<AbstractDelta<String>> - the Deltas to be output as a single block deltas, int - the number of lines of context to place around block contextSize, boolean newFile)processDeltas takes a list of Deltas and outputs them together in a single block of Unified-Diff-format text. |
| private static void |
| NULL_FILE_INDICATOR | back to summary |
|---|---|
| private static final String NULL_FILE_INDICATOR | |
| UNIFIED_DIFF_CHUNK_REGEXP | back to summary |
|---|---|
| private static final Pattern UNIFIED_DIFF_CHUNK_REGEXP | |
| UnifiedDiffUtils | back to summary |
|---|---|
| private UnifiedDiffUtils() | |
| generateOriginalAndDiff | back to summary |
|---|---|
| public static List Compare the differences between two files and return to the original file and diff format (This method compares the original file with the comparison file to obtain a diff, and inserts the diff into the corresponding position of the original file. You can see all the differences and unmodified places from the original file. Also, this will be very easy and useful for making side-by-side comparison display applications, for example, if you use diff2html (https://github.com/rtfpessoa/diff2html#usage) Wait for tools to display your differences on html pages, you only need to insert the return value into your js code) | |
| generateOriginalAndDiff | back to summary |
|---|---|
| public static List Compare the differences between two files and return to the original file and diff format (This method compares the original file with the comparison file to obtain a diff, and inserts the diff into the corresponding position of the original file. You can see all the differences and unmodified places from the original file. Also, this will be very easy and useful for making side-by-side comparison display applications, for example, if you use diff2html (https://github.com/rtfpessoa/diff2html#usage) Wait for tools to display your differences on html pages, you only need to insert the return value into your js code) | |
| generateUnifiedDiff | back to summary |
|---|---|
| public static List generateUnifiedDiff takes a Patch and some other arguments, returning the Unified Diff format text representing the Patch. Author: Bill James ([email protected]).
| |
| getDeltaText | back to summary |
|---|---|
| private static List getDeltaText returns the lines to be added to the Unified Diff text from the Delta parameter. Author: Bill James ([email protected]).
| |
| getOrigList | back to summary |
|---|---|
| private static List | |
| getRowMap | back to summary |
|---|---|
| private static Map | |
| insert | back to summary |
|---|---|
| private static void insert(List<String> result, List<String> noChangeContent) | |
| insertOrig | back to summary |
|---|---|
| private static List | |
| insertOrig | back to summary |
|---|---|
| private static void insertOrig(List<List<String>> diffList, List<String> result, List<String> original) | |
| parseUnifiedDiff | back to summary |
|---|---|
| public static Patch Parse the given text in unified format and creates the list of deltas for it. | |
| processDeltas | back to summary |
|---|---|
| private static List processDeltas takes a list of Deltas and outputs them together in a single block of Unified-Diff-format text. Author: Bill James ([email protected]).
| |
| processLinesInPrevChunk | back to summary |
|---|---|
| private static void processLinesInPrevChunk(List<String[]> rawChunk, Patch<String> patch, int old_ln, int new_ln) | |