Package ghidra.plugins.importer.tasks

# Class ImportBatchTask

java.lang.Object
ghidra.util.task.Task
ghidra.plugins.importer.tasks.ImportBatchTask

All Implemented Interfaces:
  `MonitoredRunnable`

public class ImportBatchTask extends Task
Performs a batch import using the data provided in the `BatchInfo` object which specifies what files and the import language that should be used.

If there are just a few files to import, they will be opened using the ProgramManager, otherwise the programManager parameter will be unused.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `MAX_PROGRAMS_TO_OPEN`

  ### Fields inherited from class ghidra.util.task.Task

  `taskMonitor, waitForTaskCompleted`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ImportBatchTask(BatchInfo batchInfo, DomainFolder destFolder, ProgramManager programManager, boolean stripLeading, boolean stripAllContainerPath, boolean mirrorFs)`
  Start a Batch Import session with an already populated `BatchInfo` instance.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `run(TaskMonitor monitor)`
  This is the method that will be called to do the work

  ### 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

  - ### MAX_PROGRAMS_TO_OPEN

    public static final int MAX_PROGRAMS_TO_OPEN
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### ImportBatchTask

    public ImportBatchTask(BatchInfo batchInfo, DomainFolder destFolder, ProgramManager programManager, boolean stripLeading, boolean stripAllContainerPath, boolean mirrorFs)
    Start a Batch Import session with an already populated `BatchInfo` instance.
    Parameters:
      `batchInfo` - `BatchInfo` state object
      `destFolder` - `DomainFolder` where to place imported files
      `programManager` - `ProgramManager` to use when opening newly imported files, null ok
      `stripLeading` - boolean true if each import source's leading path should be omitted when creating the destination project folder path.
      `stripAllContainerPath` - boolean true if each imported file's parent container source path should be completely omitted when creating the destination project folder path. (the imported file's path within its container is still used)
      `mirrorFs` - boolean true if the filesystem should be mirrored during import

- ## Method Details

  - ### 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