Package ghidra.plugin.importer

# Class ImporterPlugin

java.lang.Object
ghidra.framework.plugintool.Plugin
ghidra.plugin.importer.ImporterPlugin

All Implemented Interfaces:
  `FileImporterService`, `ApplicationLevelPlugin`, `ProjectListener`, `PluginEventListener`, `ServiceListener`, `ExtensionPoint`

public class ImporterPlugin extends Plugin implements FileImporterService, ApplicationLevelPlugin, ProjectListener
A `Plugin` that supplies menu items and tasks to import files into Ghidra.

- ## Field Summary

  ### Fields inherited from class ghidra.framework.plugintool.Plugin

  `name, pluginDescription, tool`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ImporterPlugin(PluginTool tool)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected void`
  `dispose()`
  Tells a plugin that it is no longer needed.
  `protected void`
  `doImportSelectionAction(Program program, ProgramSelection selection)`
  `void`
  `importFile(DomainFolder folder, File file)`
  Imports the given file into the specified Ghidra project folder.
  `void`
  `importFiles(DomainFolder destFolder, List<File> files)`
  Imports the given files into the specified Ghidra project folder.
  `protected void`
  `init()`
  Initialization method; override to add initialization for this plugin.
  `void`
  `processEvent(PluginEvent event)`
  Method called to process a plugin event.
  `void`
  `projectClosed(Project project)`
  Notification that the given project is closed.
  `void`
  `projectOpened(Project project)`
  Notification that the given project is open.

  ### Methods inherited from class ghidra.framework.plugintool.Plugin

  `accept, acceptData, canClose, canCloseDomainObject, cleanup, close, dataStateRestoreCompleted, dependsUpon, deregisterService, equals, eventSent, firePluginEvent, getData, getMissingRequiredServices, getName, getPluginDescription, getServicesRequired, getSupportedDataTypes, getTool, getTransientState, getUndoRedoState, hashCode, hasMissingRequiredService, hasUnsaveData, internalRegisterEventConsumed, isDisposed, prepareToSave, readConfigState, readDataState, registerDynamicServiceProvided, registerServiceProvided, restoreTransientState, restoreUndoRedoState, saveData, serviceAdded, serviceRemoved, writeConfigState, writeDataState`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ImporterPlugin

    public ImporterPlugin(PluginTool tool)

- ## Method Details

  - ### init

    protected void init()
    Description copied from class: `Plugin`
    Initialization method; override to add initialization for this plugin. This is where a plugin should acquire its services. When this method is called, all plugins have been instantiated in the tool.
    Overrides:
      `init` in class `Plugin`

  - ### dispose

    protected void dispose()
    Description copied from class: `Plugin`
    Tells a plugin that it is no longer needed. The plugin should release any resources that it has. All actions, components, services will automatically be cleaned up.
    Overrides:
      `dispose` in class `Plugin`

  - ### processEvent

    public void processEvent(PluginEvent event)
    Description copied from class: `Plugin`
    Method called to process a plugin event. Plugins should override this method if the plugin processes PluginEvents;
    Overrides:
      `processEvent` in class `Plugin`
    Parameters:
      `event` - plugin to process

  - ### importFiles

    public void importFiles(DomainFolder destFolder, List<File> files)
    Description copied from interface: `FileImporterService`
    Imports the given files into the specified Ghidra project folder.
    Specified by:
      `importFiles` in interface `FileImporterService`
    Parameters:
      `destFolder` - the Ghidra project folder to store the imported files. If null, the active project's root folder will be assumed.
      `files` - the files to import.

  - ### importFile

    public void importFile(DomainFolder folder, File file)
    Description copied from interface: `FileImporterService`
    Imports the given file into the specified Ghidra project folder.
    Specified by:
      `importFile` in interface `FileImporterService`
    Parameters:
      `folder` - the Ghidra project folder to store the imported file. If null, the active project's root folder will be assumed.
      `file` - the file to import.

  - ### projectClosed

    public void projectClosed(Project project)
    Description copied from interface: `ProjectListener`
    Notification that the given project is closed.
    Specified by:
      `projectClosed` in interface `ProjectListener`
    Parameters:
      `project` - project that is closed

  - ### projectOpened

    public void projectOpened(Project project)
    Description copied from interface: `ProjectListener`
    Notification that the given project is open.
    Specified by:
      `projectOpened` in interface `ProjectListener`
    Parameters:
      `project` - project that is opened

  - ### doImportSelectionAction

    protected void doImportSelectionAction(Program program, ProgramSelection selection)