Package ghidra.features.base.replace.items

# Class CompositeFieldQuickFix

java.lang.Object
ghidra.features.base.quickfix.QuickFix
ghidra.features.base.replace.items.CompositeFieldQuickFix

Direct Known Subclasses:
  `RenameFieldQuickFix`, `UpdateFieldCommentQuickFix`

public abstract class CompositeFieldQuickFix extends QuickFix
Base class for Composite field Quick Fixes. Primarily exists to host the logic for finding components in a composite even as it is changing.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected Composite`
  `composite`

  ### Fields inherited from class ghidra.features.base.quickfix.QuickFix

  `current, original, program, replacement`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CompositeFieldQuickFix(Program program, Composite composite, int ordinal, String original, String newName)`
  Constructor

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected void`
  `editComposite(DataTypeManagerService dtmService)`
  `protected DataTypeComponent`
  `findComponent(String name)`
  `Address`
  `getAddress()`
  Returns the address of the affected program element if applicable or null otherwise.
  `protected DataTypeComponent`
  `getComponentByOrdinal()`
  `Map<String,String>`
  `getCustomToolTipData()`
  `protected abstract String`
  `getFieldName()`
  `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.
  `protected boolean`
  `navigateSpecial(ServiceProvider services, boolean fromSelectionChange)`
  QuickFix items can override this method if they want to do some special navigation when the table selection changes or the user double clicks (or presses `<return>` key) to navigate.

  ### Methods inherited from class ghidra.features.base.quickfix.QuickFix

  `doGetCurrent, execute, getActionName, getCurrent, getItemType, getOriginal, getPreview, getProgramLocation, getStatus, getStatusMessage, performAction, refresh, setStatus, setStatus, statusChanged`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### composite

    protected Composite composite

- ## Constructor Details

  - ### CompositeFieldQuickFix

    public CompositeFieldQuickFix(Program program, Composite composite, int ordinal, String original, String newName)
    Constructor
    Parameters:
      `program` - the program containing the composite.
      `composite` - the composite being changed
      `ordinal` - the ordinal of the field within the composite
      `original` - the original name of the field
      `newName` - the new name for the field

- ## Method Details

  - ### getAddress

    public Address getAddress()
    Description copied from class: `QuickFix`
    Returns the address of the affected program element if applicable or null otherwise.
    Specified by:
      `getAddress` in class `QuickFix`
    Returns:
      the address of the affected program element if applicable or null otherwise

  - ### getPath

    public String getPath()
    Description copied from class: `QuickFix`
    Returns a path (the meaning of the path varies with the item type) associated with the affected program element if applicable or null otherwise.
    Specified by:
      `getPath` in class `QuickFix`
    Returns:
      a path associated with the affected program if applicable or null otherwise

  - ### findComponent

    protected DataTypeComponent findComponent(String name)

  - ### getComponentByOrdinal

    protected DataTypeComponent getComponentByOrdinal()

  - ### getCustomToolTipData

    public Map<String,String> getCustomToolTipData()
    Overrides:
      `getCustomToolTipData` in class `QuickFix`

  - ### navigateSpecial

    protected boolean navigateSpecial(ServiceProvider services, boolean fromSelectionChange)
    Description copied from class: `QuickFix`
    QuickFix items can override this method if they want to do some special navigation when the table selection changes or the user double clicks (or presses `<return>` key) to navigate.
    Overrides:
      `navigateSpecial` in class `QuickFix`
    Parameters:
      `services` - the tool service provider
      `fromSelectionChange` - true if this call was caused by the table selection changing
    Returns:
      true if this item handles the navigation and false if the QuickFix did not handle the navigation and the client should attempt to do generic navigation.

  - ### getFieldName

    protected abstract String getFieldName()

  - ### editComposite

    protected void editComposite(DataTypeManagerService dtmService)