Class ListingDiffHighlightProvider
java.lang.Object
ghidra.features.base.codecompare.listing.ListingDiffHighlightProvider
- All Implemented Interfaces:
ListingHighlightProvider
-
Field Summary
Fields inherited from interface ghidra.app.util.ListingHighlightProvider
NO_HIGHLIGHTS
-
Constructor Summary
ConstructorDescriptionListingDiffHighlightProvider
(ListingDiff listingDiff, Duo.Side side, ListingCodeComparisonOptions comparisonOptions) Constructor for this highlight provider. -
Method Summary
Modifier and TypeMethodDescriptioncreateHighlights
(String text, ListingField field, int cursorTextOffset) Get the highlights appropriate for the given text
-
Constructor Details
-
ListingDiffHighlightProvider
public ListingDiffHighlightProvider(ListingDiff listingDiff, Duo.Side side, ListingCodeComparisonOptions comparisonOptions) Constructor for this highlight provider.- Parameters:
listingDiff
- the ListingDiff to use to determine where there are differences that need highlighting.side
- LEFT or RIGHT false means the highlights are for the second listing.comparisonOptions
- the tool options that indicate the current background colors for the Listing code comparison panel.
-
-
Method Details
-
createHighlights
Description copied from interface:ListingHighlightProvider
Get the highlights appropriate for the given text- Specified by:
createHighlights
in interfaceListingHighlightProvider
- Parameters:
text
- the entire text contained in the field, regardless of layout.field
- the field being rendered. From this field you can get the field factory and the proxy object, which is usually aCodeUnit
.cursorTextOffset
- the cursor position within the given text or -1 if no cursor in this field.- Returns:
- an array of highlight objects that indicate the location within the text string to be highlighted.
-