Package ghidra.util

Class 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 via #addTrackedTask(Task).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TaskUtilities

        public TaskUtilities()
    • 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 via #addTrackedTask(Task).
        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 watch
        monitor - 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.