5.1.1.3.4. TextDocumentDiffModel¶
This module provides a document model for the Diff Viewer.
A document is made of text blocks that are themselves made of text fragments. A text block corresponds to a chunck of lines and is decorated by a frame type corresponding to the type of chunck. A text fragment is a piece of text and is decorated by a frame type and a token type used for the syntax highlighting. The frame type is used for replace chunck type to show the inner-line difference.
-
class
CodeReview.Diff.TextDocumentDiffModel.TextBlockDiff(line_slice, frame_type=None, other_side=None)[source]¶ Bases:
CodeReview.Diff.TextDocumentModel.TextBlockThis class implements a text block with a link to the other side.
The parameter line_slice specifies the line slice corresponding to the text block and the parameter frame_type the type of frame. The parameter other_side specifies the corresponding text block of the second document.
Public Attributes:
other_side
-
class
CodeReview.Diff.TextDocumentDiffModel.TextDocumentDiffModelFactory[source]¶ Bases:
object-
_append_sub_chunk(sub_chunks, text_block1, text_block2)[source]¶ Append sub-chunks to the text blocks.
-