Class 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 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 class BackgroundCommand
        Parameters:
        obj - 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