Class OpenProgramTask

java.lang.Object
ghidra.util.task.Task
ghidra.app.util.task.OpenProgramTask
All Implemented Interfaces:
MonitoredRunnable

public class OpenProgramTask extends Task
  • Constructor Details

    • OpenProgramTask

      public OpenProgramTask(Object consumer)
    • OpenProgramTask

      public OpenProgramTask(DomainFile domainFile, int version, boolean forceReadOnly, Object consumer)
    • OpenProgramTask

      public OpenProgramTask(DomainFile domainFile, int version, Object consumer)
    • OpenProgramTask

      public OpenProgramTask(DomainFile domainFile, boolean forceReadOnly, Object consumer)
    • OpenProgramTask

      public OpenProgramTask(DomainFile domainFile, Object consumer)
    • OpenProgramTask

      public OpenProgramTask(URL ghidraURL, Object consumer)
  • Method Details

    • setOpenPromptText

      public void setOpenPromptText(String text)
    • addProgramToOpen

      public void addProgramToOpen(DomainFile domainFile, int version)
    • addProgramToOpen

      public void addProgramToOpen(DomainFile domainFile, int version, boolean forceReadOnly)
    • addProgramToOpen

      public void addProgramToOpen(URL ghidraURL)
    • hasOpenProgramRequests

      public boolean hasOpenProgramRequests()
    • setSilent

      public void setSilent()
      Invoking this method prior to task execution will prevent any confirmation interaction with the user (e.g., optional checkout, snapshot recovery, etc.). Errors may still be displayed if they occur.
    • setNoCheckout

      public void setNoCheckout()
      Invoking this method prior to task execution will prevent the use of optional checkout which require prompting the user.
    • getOpenPrograms

      public List<OpenProgramTask.OpenProgramRequest> getOpenPrograms()
      Get all successful open program requests
      Returns:
      all successful open program requests
    • getOpenProgram

      public OpenProgramTask.OpenProgramRequest getOpenProgram()
      Get the first successful open program request
      Returns:
      first successful open program request or null if none
    • run

      public void run(TaskMonitor monitor)
      Description copied from class: Task
      This is the method that will be called to do the work

      Note: 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) or Swing.runNow(Runnable)to schedule the Runnable inside of the AWT Event Thread.

      Specified by:
      run in class Task
      Parameters:
      monitor - The TaskMonitor that will monitor the executing Task