Class VtTask

java.lang.Object
ghidra.util.task.Task
ghidra.feature.vt.gui.task.VtTask
All Implemented Interfaces:
ghidra.util.task.MonitoredRunnable
Direct Known Subclasses:
AcceptMatchTask, ApplyBlockedMatchTask, ApplyMarkupAtDestinationAddressTask, ApplyMarkupItemTask, ApplyMatchTask, ClearMarkupItemConsideredStatusTask, ClearMatchTask, CreateImpliedMatchesTask, CreateManualMatchTask, RejectMatchTask, RemoveMatchTask, SetMarkupItemDestinationAddressTask, TagMarkupItemTask, UnapplyMarkupItemTask

public abstract class VtTask extends ghidra.util.task.Task
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final VTSession
     

    Fields inherited from class ghidra.util.task.Task

    taskMonitor, waitForTaskCompleted
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    VtTask(String title, VTSession session)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
     
    protected abstract boolean
    doWork(ghidra.util.task.TaskMonitor monitor)
     
    Returns an HTML formated error message
    protected String
     
    boolean
    returns true if the task did not successfully complete due to an error
    protected void
     
    final void
    run(ghidra.util.task.TaskMonitor monitor)
     
    protected boolean
    Determine if session events should be suspended during task execution.
    void
     
    boolean
    Returns true if this task was cancelled.
    boolean
    Returns true if the Task executed successfully.

    Methods inherited from class ghidra.util.task.Task

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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • session

      protected final VTSession session
  • Constructor Details

  • Method Details

    • run

      public final void run(ghidra.util.task.TaskMonitor monitor)
      Specified by:
      run in class ghidra.util.task.Task
    • shouldSuspendSessionEvents

      protected boolean shouldSuspendSessionEvents()
      Determine if session events should be suspended during task execution. This can improve performance during task execution at the expense of bulk table updates at task completion. Method return false by default. If not constructed with a session this method is not used.
      Returns:
      true if events should be suspended
    • doWork

      protected abstract boolean doWork(ghidra.util.task.TaskMonitor monitor) throws Exception
      Throws:
      Exception
    • wasCancelled

      public boolean wasCancelled()
      Returns true if this task was cancelled.
      Returns:
      true if this task was cancelled.
    • wasSuccessfull

      public boolean wasSuccessfull()
      Returns true if the Task executed successfully.

      Note: this method only makes sense if called after the task has executed. If called before, it will always return false;

      Returns:
      true if the Task executed successfully.
    • hasErrors

      public boolean hasErrors()
      returns true if the task did not successfully complete due to an error
      Returns:
      true if the task did not successfully complete due to an error
    • showErrors

      public void showErrors()
    • getErrorHeader

      protected String getErrorHeader()
    • getErrorDetails

      public String getErrorDetails()
      Returns an HTML formated error message
      Returns:
      an HTML formatted error message
    • reportError

      protected void reportError(Exception e)
    • addErrors

      protected void addErrors(VtTask task)