Class ImporterDialog

java.lang.Object
docking.DialogComponentProvider
ghidra.plugin.importer.ImporterDialog
All Implemented Interfaces:
ActionContextProvider, StatusListener, TaskListener
Direct Known Subclasses:
AddToProgramDialog

public class ImporterDialog extends DialogComponentProvider
Dialog for importing a file into Ghidra as a program.
  • Field Details

  • Constructor Details

    • ImporterDialog

      public ImporterDialog(PluginTool tool, ProgramManager programManager, LoaderMap loaderMap, ByteProvider byteProvider, String suggestedDestinationPath)
      Construct a new dialog for importing a file as a new program into Ghidra.
      Parameters:
      tool - the active tool that spawned this dialog.
      programManager - program manager to open imported file with or null
      loaderMap - the loaders and their corresponding load specifications
      byteProvider - the ByteProvider for getting the bytes from the file to be imported. The dialog takes ownership of the ByteProvider and it will be closed when the dialog is closed
      suggestedDestinationPath - optional string path that will be pre-pended to the destination name. Any path specified in the destination name field will be created when the user performs the import (as opposed to the destination folder option which requires the DomainFolder to already exist). The two destination paths work together to specify the final Ghidra project folder where the imported binary is placed.
    • ImporterDialog

      protected ImporterDialog(String title, PluginTool tool, LoaderMap loaderMap, ByteProvider byteProvider, String suggestedDestinationPath)
  • Method Details

    • setDestinationFolder

      public void setDestinationFolder(DomainFolder folder)
      Sets the destination folder for the imported program.
      Parameters:
      folder - the folder to store the imported program.
    • selectedLoaderChanged

      protected void selectedLoaderChanged()
    • okCallback

      protected void okCallback()
      Description copied from class: DialogComponentProvider
      The callback method for when the "OK" button is pressed.
      Overrides:
      okCallback in class DialogComponentProvider
    • close

      public void close()
      Overrides:
      close in class DialogComponentProvider
    • getOptions

      protected List<Option> getOptions(LoadSpec loadSpec)
    • getSelectedLoadSpec

      protected LoadSpec getSelectedLoadSpec(Loader loader)
    • getSelectedLoader

      protected Loader getSelectedLoader()
    • validateFormInput

      protected boolean validateFormInput()
    • setSelectedLanguage

      protected void setSelectedLanguage(LanguageCompilerSpecPair lcsPair)