Package ghidra.plugin.importer
Class ImporterPlugin
- java.lang.Object
-
- ghidra.framework.plugintool.Plugin
-
- ghidra.plugin.importer.ImporterPlugin
-
- All Implemented Interfaces:
FileImporterService,FrontEndable,ProjectListener,PluginEventListener,ServiceListener,ExtensionPoint
public class ImporterPlugin extends Plugin implements FileImporterService, FrontEndable, ProjectListener
APluginthat supplies menu items and tasks to import files into Ghidra.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface ghidra.util.classfinder.ExtensionPoint
ExtensionPoint.Exclude, ExtensionPoint.Util
-
-
Field Summary
-
Fields inherited from class ghidra.framework.plugintool.Plugin
name, pluginDescription, tool
-
-
Constructor Summary
Constructors Constructor Description ImporterPlugin(PluginTool tool)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddispose()Tells a plugin that it is no longer needed.protected voiddoImportSelectionAction(ProgramSelection selection)voidimportFile(DomainFolder folder, java.io.File file)Imports the given file into the specified Ghidra project folder.voidimportFiles(DomainFolder destFolder, java.util.List<java.io.File> files)Imports the given files into the specified Ghidra project folder.protected voidinit()Initialization method; override to add initialization for this plugin.voidprocessEvent(PluginEvent event)Method called to process a plugin event.voidprojectClosed(Project project)Notification that the given project is closed.voidprojectOpened(Project project)Notification that the given project is open.voidreadConfigState(SaveState saveState)Tells the Plugin to read its data-independent (preferences) properties from the input stream.voidwriteConfigState(SaveState saveState)Tells a Plugin to write any data-independent (preferences) properties to the output stream.-
Methods inherited from class ghidra.framework.plugintool.Plugin
acceptData, canClose, canCloseDomainObject, cleanup, close, dataStateRestoreCompleted, dependsUpon, deregisterService, equals, eventSent, firePluginEvent, getData, getMissingRequiredServices, getName, getPluginDescription, getPluginName, getServicesRequired, getSupportedDataTypes, getTool, getTransientState, getUndoRedoState, hashCode, hasMissingRequiredService, hasUnsaveData, isDisposed, prepareToSave, readDataState, registerDynamicEventConsumed, registerDynamicServiceProvided, registerEventConsumed, registerEventProduced, registerServiceProvided, registerServiceUsed, restoreTransientState, restoreUndoRedoState, saveData, serviceAdded, serviceRemoved, writeDataState
-
-
-
-
Constructor Detail
-
ImporterPlugin
public ImporterPlugin(PluginTool tool)
-
-
Method Detail
-
init
protected void init()
Description copied from class:PluginInitialization 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.
-
readConfigState
public void readConfigState(SaveState saveState)
Description copied from class:PluginTells the Plugin to read its data-independent (preferences) properties from the input stream.- Overrides:
readConfigStatein classPlugin- Parameters:
saveState- object that holds primitives for state information
-
writeConfigState
public void writeConfigState(SaveState saveState)
Description copied from class:PluginTells a Plugin to write any data-independent (preferences) properties to the output stream.- Overrides:
writeConfigStatein classPlugin- Parameters:
saveState- object that holds primitives for state information
-
dispose
protected void dispose()
Description copied from class:PluginTells 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.
-
processEvent
public void processEvent(PluginEvent event)
Description copied from class:PluginMethod called to process a plugin event. Plugins should override this method if the plugin processes PluginEvents;- Overrides:
processEventin classPlugin- Parameters:
event- plugin to process
-
importFiles
public void importFiles(DomainFolder destFolder, java.util.List<java.io.File> files)
Description copied from interface:FileImporterServiceImports the given files into the specified Ghidra project folder.- Specified by:
importFilesin interfaceFileImporterService- Parameters:
destFolder- the Ghidra project folder to store the imported files.files- the files to import.
-
importFile
public void importFile(DomainFolder folder, java.io.File file)
Description copied from interface:FileImporterServiceImports the given file into the specified Ghidra project folder.- Specified by:
importFilein interfaceFileImporterService- Parameters:
folder- the Ghidra project folder to store the imported file.file- the file to import.
-
projectClosed
public void projectClosed(Project project)
Description copied from interface:ProjectListenerNotification that the given project is closed.- Specified by:
projectClosedin interfaceProjectListener- Parameters:
project- project that is closed
-
projectOpened
public void projectOpened(Project project)
Description copied from interface:ProjectListenerNotification that the given project is open.- Specified by:
projectOpenedin interfaceProjectListener- Parameters:
project- project that is opened
-
doImportSelectionAction
protected void doImportSelectionAction(ProgramSelection selection)
-
-