Package ghidra.plugin.importer
Class ImporterDialog
java.lang.Object
docking.DialogComponentProvider
ghidra.plugin.importer.ImporterDialog
- All Implemented Interfaces:
ActionContextProvider
,StatusListener
,TaskListener
- Direct Known Subclasses:
AddToProgramDialog
Dialog for importing a file into Ghidra as a program.
-
Field Summary
Modifier and TypeFieldDescriptionprotected ByteProvider
protected JButton
protected JTextField
protected FSRL
protected JButton
protected JTextField
protected GhidraComboBox
<Loader> protected JTextField
protected JButton
protected LanguageCompilerSpecPair
protected PluginTool
Fields inherited from class docking.DialogComponentProvider
applyButton, buttonPanel, cancelButton, dismissButton, okButton, rootPanel
-
Constructor Summary
ModifierConstructorDescriptionImporterDialog
(PluginTool tool, ProgramManager programManager, LoaderMap loaderMap, ByteProvider byteProvider, String suggestedDestinationPath) Construct a new dialog for importing a file as a new program into Ghidra.protected
ImporterDialog
(String title, PluginTool tool, LoaderMap loaderMap, ByteProvider byteProvider, String suggestedDestinationPath) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
getOptions
(LoadSpec loadSpec) protected Loader
protected LoadSpec
getSelectedLoadSpec
(Loader loader) protected void
The callback method for when the "OK" button is pressed.protected void
void
setDestinationFolder
(DomainFolder folder) Sets the destination folder for the imported program.protected void
protected boolean
Methods inherited from class docking.DialogComponentProvider
addAction, addApplyButton, addButton, addCancelButton, addDismissButton, addOKButton, addWorkPanel, alertMessage, alertMessage, applyCallback, cancelCallback, cancelCurrentTask, clearScheduledTask, clearStatusText, closeDialog, dialogClosed, dialogShown, dismissCallback, dispose, doInitialize, escapeCallback, executeProgressTask, getActionContext, getActions, getBackground, getBounds, getComponent, getDefaultButton, getDefaultSize, getDialogSize, getFocusComponent, getGlassPane, getHelpLocation, getId, getInitialLocation, getLocationOnScreen, getParent, getPreferredSize, getRememberLocation, getRememberSize, getStatusColor, getStatusLabel, getStatusText, getTaskMonitorComponent, getTaskScheduler, getTitle, getUseSharedLocation, hideTaskMonitorComponent, isApplyEnabled, isCancelEnabled, isModal, isOKEnabled, isResizeable, isRunningTask, isShowing, isTransient, isVisible, notifyContextChanged, removeAction, removeButton, removeWorkPanel, repack, setAccessibleDescription, setApplyEnabled, setApplyToolTip, setBackground, setCancelButtonText, setCancelEnabled, setCancelToolTip, setCursor, setDefaultButton, setDefaultSize, setDialogSize, setDismissToolTip, setFocusComponent, setGlassPane, setHelpLocation, setInitialLocation, setMinimumSize, setMinimumSize, setOkButtonText, setOkEnabled, setOkToolTip, setPreferredSize, setRememberLocation, setRememberSize, setResizable, setStatusJustification, setStatusText, setStatusText, setStatusText, setTitle, setTransient, setUseSharedLocation, showProgressBar, showTaskMonitorComponent, stopProgressTimer, taskCancelled, taskCompleted, toFront, toString, waitForCurrentTask
-
Field Details
-
tool
-
fsrl
-
options
-
selectedLanguage
-
byteProvider
-
nameTextField
-
folderButton
-
languageButton
-
languageTextField
-
optionsButton
-
folderNameTextField
-
loaderComboBox
-
-
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 nullloaderMap
- the loaders and their corresponding load specificationsbyteProvider
- 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 closedsuggestedDestinationPath
- 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 thedestination 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
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 classDialogComponentProvider
-
close
public void close()- Overrides:
close
in classDialogComponentProvider
-
getOptions
-
getSelectedLoadSpec
-
getSelectedLoader
-
validateFormInput
protected boolean validateFormInput() -
setSelectedLanguage
-