Package ghidra.util
Class TaskUtilities
java.lang.Object
ghidra.util.TaskUtilities
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addTrackedTask
(Task task, TaskMonitor monitor) Adds a Task to the list of tasks that have not yet finished running.static void
addTrackedTaskListener
(TrackedTaskListener listener) Adds a listener that will be notified when tasks are tracked (when they are added and removed from tracking).static boolean
Returns true if there are tasks that are running or need to be run.static boolean
isTaskRunning
(String title) Returns true if the task with the indicated title is running.static void
removeTrackedTask
(Task task) Removes the Task to the list of tasks that have not yet finished running.static void
removeTrackedTaskListener
(TrackedTaskListener listener) Removes the given listener added viaaddTrackedTask(Task,TaskMonitor)
.
-
Constructor Details
-
TaskUtilities
public TaskUtilities()
-
-
Method Details
-
addTrackedTaskListener
Adds a listener that will be notified when tasks are tracked (when they are added and removed from tracking).- Parameters:
listener
- The listener to add.
-
removeTrackedTaskListener
Removes the given listener added viaaddTrackedTask(Task,TaskMonitor)
.- Parameters:
listener
- The listener that needs to be removed.
-
addTrackedTask
Adds a Task to the list of tasks that have not yet finished running.Note: it is safe to add the same task more than once, as it will not be repeatedly tracked.
- Parameters:
task
- The task to watchmonitor
- the task monitor for the given task
-
removeTrackedTask
Removes the Task to the list of tasks that have not yet finished running.- Parameters:
task
- The task to stop watching.
-
isExecutingTasks
public static boolean isExecutingTasks()Returns true if there are tasks that are running or need to be run.- Returns:
- true if there are tasks that are running or need to be run.
-
isTaskRunning
Returns true if the task with the indicated title is running.- Parameters:
title
- the title of the desired task- Returns:
- true if the task with the indicated title is running.
-