Package ghidra.app.cmd.memory

# Class MoveBlockTask

java.lang.Object
ghidra.util.task.Task
ghidra.program.util.ProgramTask
ghidra.app.cmd.memory.MoveBlockTask

All Implemented Interfaces:
  `MonitoredRunnable`

public class MoveBlockTask extends ProgramTask
Command that runs in the background to move a memory block, as the move may be a time consuming operation.

- ## Field Summary

  ### Fields inherited from class ghidra.program.util.ProgramTask

  `program`

  ### Fields inherited from class ghidra.util.task.Task

  `taskMonitor, waitForTaskCompleted`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MoveBlockTask(Program program, Address currentStart, Address newStart, MoveBlockListener listener)`
  Creates a background command for moving memory blocks.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected void`
  `doRun(TaskMonitor monitor)`
  `String`
  `getStatusMessage()`
  `boolean`
  `isCancelled()`
  `boolean`
  `wasSuccessful()`

  ### Methods inherited from class ghidra.program.util.ProgramTask

  `run`

  ### Methods inherited from class ghidra.util.task.Task

  `addTaskListener, canCancel, cancel, getStatusTextAlignment, getTaskTitle, getWaitForTaskCompleted, hasProgress, isModal, monitoredRun, notifyTaskListeners, setHasProgress`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### MoveBlockTask

    public MoveBlockTask(Program program, Address currentStart, Address newStart, MoveBlockListener listener)
    Creates a background command for moving memory blocks. The memory block is moved from its current start address to its new start address. 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:
      `program` - the program whose memory map is being modified
      `currentStart` - the start address of the block before the move.
      `newStart` - the start address of the block after the move.
      `listener` - listener that will be notified when the move block has completed.

- ## Method Details

  - ### doRun

    protected void doRun(TaskMonitor monitor)
    Specified by:
      `doRun` in class `ProgramTask`

  - ### isCancelled

    public boolean isCancelled()
    Overrides:
      `isCancelled` in class `Task`

  - ### wasSuccessful

    public boolean wasSuccessful()

  - ### getStatusMessage

    public String getStatusMessage()