Package ghidra.plugin.importer
Class AddToProgramDialog
- java.lang.Object
-
- docking.DialogComponentProvider
-
- ghidra.plugin.importer.ImporterDialog
-
- ghidra.plugin.importer.AddToProgramDialog
-
- All Implemented Interfaces:
ActionContextProvider
,StatusListener
,TaskListener
public class AddToProgramDialog extends ImporterDialog
The AddToProgramDialog is essentially the same as the ImporterDialog with a few exceptions. One difference is that the language and destination folder/name are not enabled and are initialized to the existing program to which the imported data will be added. Also, the Ok callback is overridden to add the data to the current program instead of creating a new program.
-
-
Field Summary
-
Fields inherited from class ghidra.plugin.importer.ImporterDialog
byteProvider, filenameTextField, folderButton, folderNameTextField, fsrl, languageButton, languageTextField, LAST_IMPORTFILE_PREFERENCE_KEY, loaderComboBox, options, optionsButton, selectedLanguage, tool
-
Fields inherited from class docking.DialogComponentProvider
applyButton, buttonPanel, cancelButton, dismissButton, okButton, rootPanel
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AddToProgramDialog(PluginTool tool, FSRL fsrl, LoaderMap loaderMap, ByteProvider byteProvider, Program addToProgram)
Construct a new AddToProgramDialog.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.List<Option>
getOptions(LoadSpec loadSpec)
protected boolean
isSupported(Loader loader)
protected void
okCallback()
The callback method for when the "OK" button is pressed.protected void
selectedLoaderChanged()
protected boolean
validateFormInput()
-
Methods inherited from class ghidra.plugin.importer.ImporterDialog
close, getSelectedLoader, getSelectedLoadSpec, setDestinationFolder, setSelectedLanguage
-
Methods inherited from class docking.DialogComponentProvider
addAction, addApplyButton, addButton, addCancelButton, addDismissButton, addOKButton, addWorkPanel, alertMessage, alertMessage, applyCallback, cancelCallback, cancelCurrentTask, clearScheduledTask, clearStatusText, dialogClosed, dialogShown, dismissCallback, dispose, doInitialize, escapeCallback, executeProgressTask, getActionContext, getActions, getBackground, getBounds, getComponent, getDefaultButton, getDefaultSize, getDialogSize, getFocusComponent, getGlassPane, getHelpLocatdion, getId, getIntialLocation, getLocationOnScreen, getParent, getPreferredSize, getRemberSize, getRememberLocation, getStatusColor, getStatusLabel, getStatusText, getTaskMonitorComponent, getTaskScheduler, getTitle, getUseSharedLocation, hideTaskMonitorComponent, isApplyEnabled, isCancelEnabled, isModal, isOKEnabled, isResizeable, isRunningTask, isShowing, isTransient, isVisible, notifyContextChanged, removeAction, removeButton, removeWorkPanel, repack, 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
-
-
-
-
Constructor Detail
-
AddToProgramDialog
protected AddToProgramDialog(PluginTool tool, FSRL fsrl, LoaderMap loaderMap, ByteProvider byteProvider, Program addToProgram)
Construct a new AddToProgramDialog.- Parameters:
tool
- the tool containing the currently open program.fsrl
- the FileSystemURL for where the imported data can be read.loaderMap
- the loaders and their corresponding load specificationsbyteProvider
- the ByteProvider from which the bytes from the source can be read. The dialog takes ownership of the ByteProvider and it will be closed when the dialog is closedaddToProgram
- the program to which the newly imported data will be added
-
-
Method Detail
-
validateFormInput
protected boolean validateFormInput()
- Overrides:
validateFormInput
in classImporterDialog
-
isSupported
protected boolean isSupported(Loader loader)
- Overrides:
isSupported
in classImporterDialog
-
selectedLoaderChanged
protected void selectedLoaderChanged()
- Overrides:
selectedLoaderChanged
in classImporterDialog
-
okCallback
protected void okCallback()
Description copied from class:DialogComponentProvider
The callback method for when the "OK" button is pressed.- Overrides:
okCallback
in classImporterDialog
-
getOptions
protected java.util.List<Option> getOptions(LoadSpec loadSpec)
- Overrides:
getOptions
in classImporterDialog
-
-