Package ghidra.app.util.task
Class OpenProgramTask
- java.lang.Object
-
- ghidra.util.task.Task
-
- ghidra.app.util.task.OpenProgramTask
-
- All Implemented Interfaces:
MonitoredRunnable
public class OpenProgramTask extends Task
-
-
Field Summary
-
Fields inherited from class ghidra.util.task.Task
taskMonitor, waitForTaskCompleted
-
-
Constructor Summary
Constructors Constructor Description OpenProgramTask(DomainFile domainFile, boolean forceReadOnly, java.lang.Object consumer)
OpenProgramTask(DomainFile domainFile, int version, boolean forceReadOnly, java.lang.Object consumer)
OpenProgramTask(DomainFile domainFile, int version, java.lang.Object consumer)
OpenProgramTask(DomainFile domainFile, java.lang.Object consumer)
OpenProgramTask(java.util.List<DomainFile> domainFileList, boolean forceReadOnly, java.lang.Object consumer)
OpenProgramTask(java.util.List<DomainFile> domainFileList, java.lang.Object consumer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addProgramToOpen(DomainFile domainFile, int version)
void
addProgramToOpen(DomainFile domainFile, int version, boolean forceReadOnly)
Program
getOpenProgram()
java.util.List<Program>
getOpenPrograms()
void
run(TaskMonitor monitor)
This is the method that will be called to do the workvoid
setNoCheckout()
Invoking this method prior to task execution will prevent the use of optional checkout which require prompting the user.void
setOpenPromptText(java.lang.String text)
void
setSilent()
Invoking this method prior to task execution will prevent any confirmation interaction with the user (e.g., optional checkout, snapshot recovery, etc.).-
Methods inherited from class ghidra.util.task.Task
addTaskListener, canCancel, cancel, getStatusTextAlignment, getTaskTitle, hasProgress, isModal, monitoredRun, notifyTaskListeners, setHasProgress
-
-
-
-
Constructor Detail
-
OpenProgramTask
public OpenProgramTask(DomainFile domainFile, int version, boolean forceReadOnly, java.lang.Object consumer)
-
OpenProgramTask
public OpenProgramTask(DomainFile domainFile, int version, java.lang.Object consumer)
-
OpenProgramTask
public OpenProgramTask(DomainFile domainFile, boolean forceReadOnly, java.lang.Object consumer)
-
OpenProgramTask
public OpenProgramTask(DomainFile domainFile, java.lang.Object consumer)
-
OpenProgramTask
public OpenProgramTask(java.util.List<DomainFile> domainFileList, boolean forceReadOnly, java.lang.Object consumer)
-
OpenProgramTask
public OpenProgramTask(java.util.List<DomainFile> domainFileList, java.lang.Object consumer)
-
-
Method Detail
-
setOpenPromptText
public void setOpenPromptText(java.lang.String text)
-
addProgramToOpen
public void addProgramToOpen(DomainFile domainFile, int version)
-
addProgramToOpen
public void addProgramToOpen(DomainFile domainFile, int version, boolean forceReadOnly)
-
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 java.util.List<Program> getOpenPrograms()
-
getOpenProgram
public Program getOpenProgram()
-
run
public void run(TaskMonitor monitor)
Description copied from class:Task
This is the method that will be called to do the workNote: 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
SystemUtilities.runSwingLater(Runnable)
orSystemUtilities.runSwingNow(Runnable)
to schedule the Runnable inside of the AWT Event Thread.
-
-