Package com.acrolinx.sidebar.lookup
Class LookupRangesDiff
java.lang.Object
com.acrolinx.sidebar.LookupRanges
com.acrolinx.sidebar.lookup.LookupRangesDiff
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadJustMatch(ExternalContentMatch match, List<ExternalContentField> checkedExternalContent, List<ExternalContentField> changedExternalContent) getExternalContentMatchesWithCorrectedRanges(List<ExternalContentMatch> matches, ExternalContent checkedText, ExternalContent changedText) List<? extends AbstractMatch>getMatchesIncludingCorrectedExternalMatches(ExternalContent checkedExternalContent, ExternalContent changedExternalContent, List<? extends AbstractMatch> abstractMatches) Optional<List<? extends AbstractMatch>>getMatchesWithCorrectedRanges(String checkedText, String changedText, List<? extends AbstractMatch> abstractMatches) Abstract method used to get the current location of matches.getOffSetDiffEnd(String originalVersion, String changedVersion, int offsetInOrignalVersion) getOffSetDiffStart(String originalVersion, String changedVersion, int offsetInOriginalVersion)
-
Constructor Details
-
LookupRangesDiff
public LookupRangesDiff()
-
-
Method Details
-
getMatchesWithCorrectedRanges
public Optional<List<? extends AbstractMatch>> getMatchesWithCorrectedRanges(String checkedText, String changedText, List<? extends AbstractMatch> abstractMatches) Description copied from class:LookupRangesAbstract method used to get the current location of matches. As the location within the current document might have changed since the last check.- Specified by:
getMatchesWithCorrectedRangesin classLookupRanges- Parameters:
checkedText- The current text as it was when a check was performed on it.changedText- The current text within the editor.abstractMatches- The matches as given for the checked text.- Returns:
- An Optional with a list with the corrected ranges will be returned. In case the text within these ranges is not present anymore an empty Optional will be returned.
-
getMatchesIncludingCorrectedExternalMatches
public List<? extends AbstractMatch> getMatchesIncludingCorrectedExternalMatches(ExternalContent checkedExternalContent, ExternalContent changedExternalContent, List<? extends AbstractMatch> abstractMatches) -
getExternalContentMatchesWithCorrectedRanges
public List<ExternalContentMatch> getExternalContentMatchesWithCorrectedRanges(List<ExternalContentMatch> matches, ExternalContent checkedText, ExternalContent changedText) -
adJustMatch
public ExternalContentMatch adJustMatch(ExternalContentMatch match, List<ExternalContentField> checkedExternalContent, List<ExternalContentField> changedExternalContent) -
getOffSetDiffStart
-
getOffSetDiffEnd
-