Package ghidra.program.util
Class ProgramTask
java.lang.Object
ghidra.util.task.Task
ghidra.program.util.ProgramTask
- All Implemented Interfaces:
MonitoredRunnable
- Direct Known Subclasses:
MoveBlockTask
Task for operating on programs. Will open and close a transaction around the
work.
-
Field Summary
Fields inherited from class ghidra.util.task.Task
taskMonitor, waitForTaskCompleted
-
Constructor Summary
ModifierConstructorDescriptionprotected
ProgramTask
(Program program, String title, boolean canCancel, boolean hasProgress, boolean isModal) Construct a new Task that will operate on a program. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
doRun
(TaskMonitor monitor) final void
run
(TaskMonitor monitor) This is the method that will be called to do the workMethods inherited from class ghidra.util.task.Task
addTaskListener, canCancel, cancel, getStatusTextAlignment, getTaskTitle, getWaitForTaskCompleted, hasProgress, isCancelled, isModal, monitoredRun, notifyTaskListeners, setHasProgress
-
Field Details
-
program
-
-
Constructor Details
-
ProgramTask
protected ProgramTask(Program program, String title, boolean canCancel, boolean hasProgress, boolean isModal) Construct a new Task that will operate on a program.- Parameters:
program
- the program that the task will operate on.title
- title the title associated with the taskcanCancel
- true means that the user can cancel the taskhasProgress
- true means that the dialog should show a progress indicatorisModal
- true means that the dialog is modal and the task has to complete or be canceled before any other action can occur
-
-
Method Details
-
run
Description copied from class:Task
This is the method that will be called to do the workNote: The run(TaskMonitor) method should not make any calls directly on Swing components, as these calls are not thread safe. Place Swing calls in a Runnable, then call
Swing.runLater(Runnable)
orSwing.runNow(Runnable)
to schedule the Runnable inside of the AWT Event Thread. -
doRun
-