Package ghidra.util
Class TaskUtilities
- java.lang.Object
-
- ghidra.util.TaskUtilities
-
public class TaskUtilities extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description TaskUtilities()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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
isExecutingTasks()
Returns true if there are tasks that are running or need to be run.static boolean
isTaskRunning(java.lang.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)
.
-
-
-
Method Detail
-
addTrackedTaskListener
public static void addTrackedTaskListener(TrackedTaskListener listener)
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
public static void removeTrackedTaskListener(TrackedTaskListener listener)
Removes the given listener added viaaddTrackedTask(Task,TaskMonitor)
.- Parameters:
listener
- The listener that needs to be removed.
-
addTrackedTask
public static void addTrackedTask(Task task, TaskMonitor monitor)
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
public static void removeTrackedTask(Task task)
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
public static boolean isTaskRunning(java.lang.String title)
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.
-
-