Class CmsTextDiff
java.lang.Object
org.opencms.ui.dialogs.history.diff.CmsTextDiff
- All Implemented Interfaces:
I_CmsDiffProvider
Interprets two versions of a resource as text files, and shows a diff view for the two texts.
This should work for both plaintext files as well as binary documents which from which OpenCms can extract text content.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncom.google.common.base.Optional<com.vaadin.ui.Component>
diff
(CmsObject cms, CmsHistoryResourceBean v1, CmsHistoryResourceBean v2) Optionally returns a comparison component to display for the given resource versions.protected String
Returns a diff text wrapped with formatting style.
-
Constructor Details
-
CmsTextDiff
public CmsTextDiff()
-
-
Method Details
-
wrapLinesWithUnchangedStyle
Returns a diff text wrapped with formatting style.- Parameters:
diff
- the text to wrap with CSS formatting- Returns:
- the text with formatting styles wrapped
- Throws:
IOException
- if something goes wrong