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 String
Returns the current value of the item.protected abstract void
execute()
Executes the action.abstract String
Returns the general name of the action to be performed.abstract Address
Returns the address of the affected program element if applicable or null otherwise.final String
Returns the current value of the affected program element.abstract String
Returns the type of program element being affected (function, label, comment, etc.)Returns the original value of the affected program element.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.final String
Returns a preview of what the affected element will be if this item is applied.abstract ProgramLocation
final QuickFixStatus
Returns the currentQuickFixStatus
of this item.Returns the current status message of this item.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.final void
Executes the primary action of this QuickFix.protected void
refresh()
void
setStatus
(QuickFixStatus status) Sets the status of this itemvoid
setStatus
(QuickFixStatus status, String message) Sets both theQuickFixStatus
and the status message for this item.protected void
statusChanged
(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 currentQuickFixStatus
of this item.- Returns:
- the current
QuickFixStatus
of 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 newQuickFixStatus
for this item.
-
setStatus
Sets both theQuickFixStatus
and 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
-