Package ghidra.app.util.viewer.field
Class FieldHighlightFactory
- java.lang.Object
-
- ghidra.app.util.viewer.field.FieldHighlightFactory
-
- All Implemented Interfaces:
HighlightFactory
public class FieldHighlightFactory extends java.lang.Object implements 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
Constructors Constructor Description FieldHighlightFactory(HighlightProvider provider, java.lang.Class<? extends FieldFactory> fieldFactoryClass, java.lang.Object obj)
Constructs a new FieldHighlightFactory.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Highlight[]
getHighlights(Field field, java.lang.String text, int cursorTextOffset)
Returns the highlights for the given text
-
-
-
Constructor Detail
-
FieldHighlightFactory
public FieldHighlightFactory(HighlightProvider provider, java.lang.Class<? extends FieldFactory> fieldFactoryClass, java.lang.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 Detail
-
getHighlights
public Highlight[] getHighlights(Field field, java.lang.String text, int cursorTextOffset)
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
-
-