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, cancelButton, dismissButton, okButton, rootPanel
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAddToProgramDialog(PluginTool tool, FSRL fsrl, java.util.Map<Loader,java.util.Collection<LoadSpec>> loadMap, 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 booleanisSupported(Loader loader)protected voidokCallback()The callback method for when the "OK" button is pressed.protected voidselectedLoaderChanged()protected booleanvalidateFormInput()-
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, doInitialize, escapeCallback, executeProgressTask, getActionContext, getActions, getBackground, getBounds, getComponent, getDefaultButton, getDefaultSize, getDialogSize, getFocusComponent, getGlassPane, getHelpLocatdion, getIntialLocation, getLocationOnScreen, getPreferredSize, getRemberSize, getRememberLocation, getStatusLabel, getStatusText, getTaskMonitorComponent, getTaskScheduler, getTitle, getUseSharedLocation, hideTaskMonitorComponent, isApplyEnabled, isCancelEnabled, isModal, isOKEnabled, isResizeable, isRunningTask, isShowing, isTransient, isVisible, main, 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, java.util.Map<Loader,java.util.Collection<LoadSpec>> loadMap, 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.loadMap- the loaders and their corresponding load specificationsbyteProvider- the ByteProvider from which the bytes from the source can be read.addToProgram- the program to which the newly imported data will be added
-
-
Method Detail
-
validateFormInput
protected boolean validateFormInput()
- Overrides:
validateFormInputin classImporterDialog
-
isSupported
protected boolean isSupported(Loader loader)
- Overrides:
isSupportedin classImporterDialog
-
selectedLoaderChanged
protected void selectedLoaderChanged()
- Overrides:
selectedLoaderChangedin classImporterDialog
-
okCallback
protected void okCallback()
Description copied from class:DialogComponentProviderThe callback method for when the "OK" button is pressed.- Overrides:
okCallbackin classImporterDialog
-
getOptions
protected java.util.List<Option> getOptions(LoadSpec loadSpec)
- Overrides:
getOptionsin classImporterDialog
-
-