Package ghidra.features.base.replace.items

# Class UpdateCommentQuickFix

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

public class UpdateCommentQuickFix extends QuickFix
QuickFix for updating listing comments.

- ## Field Summary

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

  `current, original, program, replacement`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `UpdateCommentQuickFix(Program program, Address address, CommentType type, String comment, String newComment)`
  Constructor

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `doGetCurrent()`
  Returns the current value of the item.
  `void`
  `execute()`
  Executes the action.
  `String`
  `getActionName()`
  Returns the general name of the action to be performed.
  `Address`
  `getAddress()`
  Returns the address of the affected program element if applicable or null otherwise.
  `String`
  `getItemType()`
  Returns the type of program element being affected (function, label, comment, etc.)
  `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.
  `ProgramLocation`
  `getProgramLocation()`

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

  `getCurrent, getCustomToolTipData, getOriginal, getPreview, getStatus, getStatusMessage, navigateSpecial, performAction, refresh, setStatus, setStatus, statusChanged`

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

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

- ## Constructor Details

  - ### UpdateCommentQuickFix

    public UpdateCommentQuickFix(Program program, Address address, CommentType type, String comment, String newComment)
    Constructor
    Parameters:
      `program` - the program containing the comment to be renamed
      `address` - The address where the comment is located
      `type` - the type of comment (Pre, Post, EOL, etc.)
      `comment` - the original comment text
      `newComment` - the new comment text

- ## Method Details

  - ### getActionName

    public String getActionName()
    Description copied from class: `QuickFix`
    Returns the general name of the action to be performed.
    Specified by:
      `getActionName` in class `QuickFix`
    Returns:
      the general name of the action to be performed

  - ### getItemType

    public String getItemType()
    Description copied from class: `QuickFix`
    Returns the type of program element being affected (function, label, comment, etc.)
    Specified by:
      `getItemType` in class `QuickFix`
    Returns:
      the type of program element being affected

  - ### doGetCurrent

    public String doGetCurrent()
    Description copied from class: `QuickFix`
    Returns the current value of the item.
    Specified by:
      `doGetCurrent` in class `QuickFix`
    Returns:
      the current value of the item

  - ### execute

    public void execute()
    Description copied from class: `QuickFix`
    Executes the action.
    Specified by:
      `execute` in class `QuickFix`

  - ### 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

  - ### getProgramLocation

    public ProgramLocation getProgramLocation()
    Specified by:
      `getProgramLocation` in class `QuickFix`

  - ### 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