Class FieldHighlightFactory

java.lang.Object
ghidra.app.util.viewer.field.FieldHighlightFactory
All Implemented Interfaces:
HighlightFactory

public class FieldHighlightFactory extends 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 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

      public Highlight[] getHighlights(Field field, String text, int cursorTextOffset)
      Description copied from interface: HighlightFactory
      Returns the highlights for the given text
      Specified by:
      getHighlights in interface HighlightFactory
      Parameters:
      field - the field that is requesting the highlight
      text - the text to be considered for highlighting
      cursorTextOffset - 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