@Role
public interface InlineDiffDisplayer
DiffResult
as an in-line diff. An in-line diff is made of a list of chunks, each marked as added,
removed or unmodified. For instance, if changes are computed at word level then you could have this in-line diff:
the <del>quick</del><ins>sick</ins> brown fox
At character level the diff looks a bit different:
the <del>qu</del><ins>s</ins>ick brown fox
In this case the first chunk is "the ", an unmodified chunk, made of 4 characters and the second chunk is "qu", a
removed chunk, made of 2 characters. An in-line diff can be displayed either as you've seen above, mixing added and
removed chunks in one line, or it can be displayed on two lines, one showing the removed chunks and the other the
added chunks:
the <del>quick</del> brown fox
the <ins>sick</ins> brown fox
Modifier and Type | Method and Description |
---|---|
<E> List<InlineDiffChunk<E>> |
display(DiffResult<E> diffResult)
Displays the given diff result as an in-line diff.
|
<E> List<InlineDiffChunk<E>> display(DiffResult<E> diffResult)
Character
,
then the in-line diff between "the quick fox" and "the sick fox" is:
the <del>qu</del><ins>s</ins>ick fox
and is made of 4 groups of Character
s: "the " unmodified, "qu" removed, "s" added and "ick fox"
unmodified.E
- the type of elements that are add/remove/modified in the given diff result (specifies the granularity
level of changes)diffResult
- the diff result to be displayedCopyright © 2004–2016 XWiki. All rights reserved.