Class QuickFix

java.lang.Object
ghidra.features.base.quickfix.QuickFix
Direct Known Subclasses:
CompositeFieldQuickFix, RenameQuickFix, UpdateCommentQuickFix, UpdateDataTypeDescriptionQuickFix, UpdateEnumCommentQuickFix

public abstract class QuickFix extends Object
Generic base class for executable items to be displayed in a table that can be executed in bulk or individually.
  • Field Details

    • program

      protected final Program program
    • original

      protected final String original
    • replacement

      protected final String replacement
    • current

      protected String current
  • Constructor Details

  • Method Details

    • getActionName

      public abstract String getActionName()
      Returns the general name of the action to be performed.
      Returns:
      the general name of the action to be performed
    • getItemType

      public abstract String getItemType()
      Returns the type of program element being affected (function, label, comment, etc.)
      Returns:
      the type of program element being affected
    • getAddress

      public abstract Address getAddress()
      Returns the address of the affected program element if applicable or null otherwise.
      Returns:
      the address of the affected program element if applicable or null otherwise
    • getPath

      public abstract String getPath()
      Returns a path (the meaning of the path varies with the item type) associated with the affected program element if applicable or null otherwise.
      Returns:
      a path associated with the affected program if applicable or null otherwise
    • getOriginal

      public String getOriginal()
      Returns the original value of the affected program element.
      Returns:
      the original value of the affected program element.
    • getCurrent

      public final String getCurrent()
      Returns the current value of the affected program element.
      Returns:
      the current value of the affected program element.
    • refresh

      protected void refresh()
    • getPreview

      public final String getPreview()
      Returns a preview of what the affected element will be if this item is applied.
      Returns:
      a preview of what the affected element will be if this item is applied
    • performAction

      public final void performAction()
      Executes the primary action of this QuickFix.
    • getStatus

      public final QuickFixStatus getStatus()
      Returns the current QuickFixStatus of this item.
      Returns:
      the current QuickFixStatus of this item
    • getStatusMessage

      public String getStatusMessage()
      Returns the current status message of this item.
      Returns:
      the current status message of this item
    • setStatus

      public void setStatus(QuickFixStatus status)
      Sets the status of this item
      Parameters:
      status - the new QuickFixStatus for this item.
    • setStatus

      public void setStatus(QuickFixStatus status, String message)
      Sets both the QuickFixStatus and the status message for this item. Typically, used to indicate a warning or error.
      Parameters:
      status - the new QuickFixStatus
      message - the status message associated with the new status.
    • getProgramLocation

      public abstract ProgramLocation getProgramLocation()
    • getCustomToolTipData

      public Map<String,String> getCustomToolTipData()
    • doGetCurrent

      protected abstract String doGetCurrent()
      Returns the current value of the item.
      Returns:
      the current value of the item
    • execute

      protected abstract void execute()
      Executes the action.
    • statusChanged

      protected void statusChanged(QuickFixStatus newStatus)