Package ghidra.app.util.viewer.field
Class FieldHighlightFactory
java.lang.Object
ghidra.app.util.viewer.field.FieldHighlightFactory
- All Implemented Interfaces:
HighlightFactory
Wrapper class to hold field factory information in the text field to be provided to the
highlightProvider to get highlights just before the field is painted.
-
Constructor Summary
ConstructorsConstructorDescriptionFieldHighlightFactory
(HighlightProvider provider, Class<? extends FieldFactory> fieldFactoryClass, Object obj) Constructs a new FieldHighlightFactory. -
Method Summary
Modifier and TypeMethodDescriptiongetHighlights
(Field field, String text, int cursorTextOffset) Returns the highlights for the given text
-
Constructor Details
-
FieldHighlightFactory
public FieldHighlightFactory(HighlightProvider provider, Class<? extends FieldFactory> fieldFactoryClass, Object obj) Constructs a new FieldHighlightFactory.- Parameters:
provider
- the HighlightProvider that will actually compute the highlights.fieldFactoryClass
- the class of the field factory that generated the field to be rendered.obj
- the object that holds the information that will be rendered (usually a code unit)
-
-
Method Details
-
getHighlights
Description copied from interface:HighlightFactory
Returns the highlights for the given text- Specified by:
getHighlights
in interfaceHighlightFactory
- Parameters:
field
- the field that is requesting the highlighttext
- the text to be considered for highlightingcursorTextOffset
- the position in the given text of the cursor. A -1 indicates the cursor is not in this field.- Returns:
- an array of highlights to be rendered
-