Package ghidra.app.cmd.memory
Class DeleteBlockCmd
- java.lang.Object
-
- ghidra.framework.cmd.BackgroundCommand
-
- ghidra.app.cmd.memory.DeleteBlockCmd
-
- All Implemented Interfaces:
Command
public class DeleteBlockCmd extends BackgroundCommand
Command that runs in the background to delete a memory block, as the delete may be a time consuming operation.
-
-
Constructor Summary
Constructors Constructor Description DeleteBlockCmd(Address[] blockAddresses, DeleteBlockListener listener)
Creates a background command for deleting memory blocks.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
applyTo(DomainObject obj, TaskMonitor monitor)
Method called when this command is to apply changes to the given domain object.boolean
getStatus()
Return whether the delete block was successful.void
taskCompleted()
Called when the task monitor is completely done with indicating progress.-
Methods inherited from class ghidra.framework.cmd.BackgroundCommand
applyTo, canCancel, dispose, getName, getStatusMsg, hasProgress, isModal, setStatusMsg, toString
-
-
-
-
Constructor Detail
-
DeleteBlockCmd
public DeleteBlockCmd(Address[] blockAddresses, DeleteBlockListener listener)
Creates a background command for deleting memory blocks. Each address in the array of block addresses indicates that the block containing that address should be removed. After the command has completed, getStatus() can be called to check the success. If unsuccessful, getStatusMsg() can be called to get a message indicating why the command failed.- Parameters:
blockAddresses
- addresses indicating each block to be removed.listener
- listener that will be notified when the delete block has completed.
-
-
Method Detail
-
applyTo
public boolean applyTo(DomainObject obj, TaskMonitor monitor)
Description copied from class:BackgroundCommand
Method called when this command is to apply changes to the given domain object. A monitor is provided to display status information about the command as it executes in the background.- Specified by:
applyTo
in classBackgroundCommand
- Parameters:
obj
- domain object that will be affected by the commandmonitor
- monitor to show progress of the command- Returns:
- true if the command applied successfully
-
getStatus
public boolean getStatus()
Return whether the delete block was successful.- Returns:
- true if the block was deleted
-
taskCompleted
public void taskCompleted()
Description copied from class:BackgroundCommand
Called when the task monitor is completely done with indicating progress.- Overrides:
taskCompleted
in classBackgroundCommand
- See Also:
BackgroundCommand.taskCompleted()
-
-