Package ghidra.features.base.quickfix
Class QuickFix
java.lang.Object
ghidra.features.base.quickfix.QuickFix
- Direct Known Subclasses:
CompositeFieldQuickFix,RenameQuickFix,UpdateCommentQuickFix,UpdateDataTypeDescriptionQuickFix,UpdateEnumCommentQuickFix
Generic base class for executable items to be displayed in a table that can be executed in bulk or
individually.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract StringReturns the current value of the item.protected abstract voidexecute()Executes the action.abstract StringReturns the general name of the action to be performed.abstract AddressReturns the address of the affected program element if applicable or null otherwise.final StringReturns the current value of the affected program element.abstract StringReturns the type of program element being affected (function, label, comment, etc.)Returns the original value of the affected program element.abstract StringgetPath()Returns a path (the meaning of the path varies with the item type) associated with the affected program element if applicable or null otherwise.final StringReturns a preview of what the affected element will be if this item is applied.abstract ProgramLocationfinal QuickFixStatusReturns the currentQuickFixStatusof this item.Returns the current status message of this item.protected booleannavigateSpecial(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.final voidExecutes the primary action of this QuickFix.protected voidrefresh()voidsetStatus(QuickFixStatus status) Sets the status of this itemvoidsetStatus(QuickFixStatus status, String message) Sets both theQuickFixStatusand the status message for this item.protected voidstatusChanged(QuickFixStatus newStatus)
-
Field Details
-
program
-
original
-
replacement
-
current
-
-
Constructor Details
-
QuickFix
-
-
Method Details
-
getActionName
Returns the general name of the action to be performed.- Returns:
- the general name of the action to be performed
-
getItemType
Returns the type of program element being affected (function, label, comment, etc.)- Returns:
- the type of program element being affected
-
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
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
Returns the original value of the affected program element.- Returns:
- the original value of the affected program element.
-
getCurrent
Returns the current value of the affected program element.- Returns:
- the current value of the affected program element.
-
refresh
protected void refresh() -
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
Returns the currentQuickFixStatusof this item.- Returns:
- the current
QuickFixStatusof this item
-
getStatusMessage
Returns the current status message of this item.- Returns:
- the current status message of this item
-
setStatus
Sets the status of this item- Parameters:
status- the newQuickFixStatusfor this item.
-
setStatus
Sets both theQuickFixStatusand the status message for this item. Typically, used to indicate a warning or error.- Parameters:
status- the new QuickFixStatusmessage- the status message associated with the new status.
-
getProgramLocation
-
getCustomToolTipData
-
doGetCurrent
Returns the current value of the item.- Returns:
- the current value of the item
-
execute
protected abstract void execute()Executes the action. -
statusChanged
-