You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Diff Utils library is an OpenSource library for performing the comparison operations between texts: computing diffs, applying patches, generating unified diffs or parsing them, generating diff output for easy future displaying (like side-by-side view) and so on.
11
12
12
13
Main reason to build this library was the lack of easy-to-use libraries with all the usual stuff you need while working with diff files. Originally it was inspired by JRCS library and it's nice design of diff module.
13
14
14
15
**This is originally a fork of java-diff-utils from Google Code Archive.**
15
16
16
-
## Examples ##
17
+
## Examples
17
18
18
-
Look [here](https://github.com/wumpz/java-diff-utils/wiki) to find more helpful informations and examples.
19
+
Look [here](https://github.com/wumpz/java-diff-utils/wiki) to find more helpful informations and examples.
19
20
20
21
These two outputs are generated using this java-diff-utils. The source code can also be found at the *Examples* page:
21
22
22
23
**Producing a one liner including all difference information.**
23
24
24
25
This is a test ~senctence~**for diffutils**.
25
26
26
-
27
27
**Producing a side by side view of computed differences.**
28
28
29
29
|original|new|
@@ -32,86 +32,51 @@ This is a test ~senctence~**for diffutils**.
32
32
|This is the second line.|This is the second line.|
33
33
|~And here is the finish.~||
34
34
35
+
## Main Features
35
36
36
-
## Main Features ##
37
-
38
-
* computing the difference between two texts.
39
-
* capable to hand more than plain ascci. Arrays or List of any type that implements hashCode() and equals() correctly can be subject to differencing using this library
40
-
* patch and unpatch the text with the given patch
41
-
* parsing the unified diff format
42
-
* producing human-readable differences
43
-
* inline difference construction
44
-
* Algorithms:
45
-
* Myer
46
-
* HistogramDiff using JGit Library
37
+
* computing the difference between two texts.
38
+
* capable to hand more than plain ascii. Arrays or List of any type that implements hashCode() and equals() correctly can be subject to differencing using this library
39
+
* patch and unpatch the text with the given patch
40
+
* parsing the unified diff format
41
+
* producing human-readable differences
42
+
* inline difference construction
43
+
* Algorithms:
44
+
* Myer
45
+
* HistogramDiff using JGit Library
47
46
48
-
### Algoritms ###
47
+
### Algorithms
49
48
50
49
* Myer's diff
51
-
* HistogramDiff
50
+
* HistogramDiff
52
51
53
52
But it can easily replaced by any other which is better for handing your texts. I have plan to add implementation of some in future.
54
53
55
-
### Changelog ###
56
-
* Version 4.1-SNAPSHOT
57
-
* preview of new Unified Diff Reader / Writer. This is not yet feature complete but passes the
58
-
tests of the old version.
59
-
* Version 4.0-SNAPSHOT
60
-
* moved to organisation **java-diff-utils**
61
-
* changed groupid to **io.github.java-diff-utils** and artifact id to **java-diff-utils**
62
-
* Version 3.0
63
-
* changed generation of inline diffes, if there are different linefeeds within one diff, then these are excluded
64
-
from the diff block.
65
-
* Due to licensing issues Delta.java and DiffAlgorithm.java were removed.
66
-
* Version 2.3-SNAPSHOT
67
-
* Introduced a process listener to diff algorithms. For long running
68
-
diffs one could implement some progress information.
69
-
* automatic module name for JDK 9 and higher usage
70
-
* Version 2.2
71
-
* released at maven central
72
-
* included checkstyle source code conventions
73
-
* groupid changed to **com.github.wumpz**, due to maven central releasing
74
-
* allow configurable splitting of lines to define the blocks to compare (words, characters, phrases).
75
-
* Version 2.0
76
-
* switch to maven and removed other artifacts
77
-
* changed groupid to **com.github.java-diff-utils** due to different forks at github
78
-
* updated maven plugins
79
-
* JDK 1.8 compatibility, sorry if you have to stick with older versions
80
-
* support for inline merge
81
-
* restructured packages heavily
82
-
* changed API
83
-
* changed Algorithm to provide only cursor positions
84
-
* integrated JGit (Eclipse Licensed) to provide HistogramDiff to gain speed for large datasets
85
-
* removed all kinds of helper classes in favour of new JDK 8 function classes like Predicate
86
-
* Version 1.2
87
-
* JDK 1.5 compatibility
88
-
* Ant build script
89
-
* Generate output in unified diff format (thanks for Bill James)
90
-
91
54
## Source Code conventions
92
55
93
56
Recently a checkstyle process was integrated into the build process. java-diff-utils follows the sun java format convention. There are no TABs allowed. Use spaces.
0 commit comments