Class DeleteBlockCmd

java.lang.Object
ghidra.framework.cmd.BackgroundCommand<Program>
ghidra.app.cmd.memory.DeleteBlockCmd
All Implemented Interfaces:
Command<Program>

public class DeleteBlockCmd extends BackgroundCommand<Program>
Command that runs in the background to delete a memory block, as the delete may be a time consuming operation.
  • Constructor Details

    • 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 Details

    • applyTo

      public boolean applyTo(Program program, 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 class BackgroundCommand<Program>
      Parameters:
      program - domain object that will be affected by the command
      monitor - 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 class BackgroundCommand<Program>
      See Also: