Package ghidra.framework.project.tool
Class GhidraTool
java.lang.Object
docking.AbstractDockingTool
ghidra.framework.plugintool.PluginTool
ghidra.framework.project.tool.GhidraTool
- All Implemented Interfaces:
Tool
,ServiceProvider
- Direct Known Subclasses:
TestTool
Tool created by the workspace when the user chooses to create a new
tool. Its ToolConfigProvider shows all Plugins with the exception of
those plugins that can be added to the Front End tool only.
-
Field Summary
FieldsFields inherited from class ghidra.framework.plugintool.PluginTool
DESCRIPTION_PROPERTY_NAME, extensionTableProvider, ICON_PROPERTY_NAME, iconURL, isDisposed, manageDialog, PLUGIN_COUNT_PROPERTY_NAME, TOOL_NAME_PROPERTY, toolName
Fields inherited from class docking.AbstractDockingTool
optionsMap, toolActions, winMgr
-
Constructor Summary
ConstructorsConstructorDescriptionGhidraTool
(Project project, GhidraToolTemplate template) Construct a new GhidraTool using an existing template.GhidraTool
(Project project, String name) Construct a new Ghidra Tool. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
void
Looks for extensions that have been installed since the last time this tool was launched.protected DockingWindowManager
createDockingWindowManager
(boolean isDockable, boolean hasStatus, boolean isModal) This method exists here, as opposed to inline in the constructor, so that subclasses can alter the behavior of the DockingWindowManager construction.protected boolean
Called when it is time to save the tool.void
exit()
getToolTemplate
(boolean includeConfigState) protected void
Placeholder for subclasses to get a chance to install actions before plugins.void
restoreWindowingDataFromXml
(org.jdom.Element rootElement) org.jdom.Element
void
setToolName
(String name) boolean
protected void
Methods inherited from class ghidra.framework.plugintool.PluginTool
acceptDomainFiles, addEventListener, addExitAction, addExportToolAction, addHelpActions, addListenerForAllPluginEvents, addOptionsAction, addPlugin, addPlugin, addPlugins, addPlugins, addPropertyChangeListener, addSaveToolAction, addServiceListener, addStatusComponent, addToolListener, beep, cancelCurrentTask, canClose, canCloseDomainFile, canCloseDomainObject, clearLastEvents, close, contextChanged, dispose, execute, execute, execute, executeBackgroundCommand, firePluginEvent, getActiveComponentProvider, getActiveWindow, getConsumedToolEventNames, getDefaultToolContext, getDomainFiles, getIcon, getIconURL, getInstanceName, getLocation, getManagedPlugins, getManagePluginsDialog, getName, getOptions, getOptions, getProject, getProjectManager, getService, getServices, getSize, getSupportedDataTypes, getToolEventNames, getToolName, getToolServices, getTransientState, getUndoRedoToolState, hasOptions, hasToolListeners, hasUnsavedData, installHomeButton, installUtilityPlugins, isConfigurable, isExecutingCommand, isService, isWindowsOnTop, optionsChanged, prepareToSave, processToolEvent, putInstanceName, refreshKeybindings, registerOptionsNameChange, removeEventListener, removeListenerForAllPluginEvents, removePlugins, removePlugins, removePreferenceState, removePropertyChangeListener, removeServiceListener, removeStatusComponent, removeToolListener, restoreDataStateFromXml, restoreFromXml, restoreOptionsFromXml, restorePluginsFromXml, saveDataStateToXml, saveTool, saveToolAs, saveToolToToolTemplate, saveToXml, scheduleFollowOnCommand, setConfigChanged, setDefaultComponent, setIconURL, setLocation, setProject, setSize, setSubTitle, setUnconfigurable, setWindowsOnTop, showComponentHeader, showConfig, showDialog, showDialog, showDialogOnActiveWindow, showEditWindow, showExtensions, terminateBackgroundCommands, threadIsBackgroundTaskThread
Methods inherited from class docking.AbstractDockingTool
addAction, addComponentProvider, addContextListener, addLocalAction, addPopupActionProvider, clearStatusInfo, getAllActions, getComponentProvider, getDockingActionsByOwnerName, getProviderWindow, getStatusInfo, getToolActions, getToolFrame, getWindowManager, hasConfigChanged, isActive, isVisible, isVisible, removeAction, removeComponentProvider, removeContextListener, removeLocalAction, removePopupActionProvider, setMenuGroup, setMenuGroup, setStatusInfo, setStatusInfo, setVisible, showComponentProvider, showDialog, toFront, toFront, updateTitle
-
Field Details
-
EXTENSIONS_PREFERENCE_NAME
- See Also:
-
autoSave
public static boolean autoSave
-
-
Constructor Details
-
GhidraTool
Construct a new Ghidra Tool.- Parameters:
project
- the project associated with the toolname
- the name of the tool
-
GhidraTool
Construct a new GhidraTool using an existing template.- Parameters:
project
- project that is the associated with the tool.template
- the template to use when creating the tool
-
-
Method Details
-
createDockingWindowManager
protected DockingWindowManager createDockingWindowManager(boolean isDockable, boolean hasStatus, boolean isModal) Description copied from class:PluginTool
This method exists here, as opposed to inline in the constructor, so that subclasses can alter the behavior of the DockingWindowManager construction.- Overrides:
createDockingWindowManager
in classPluginTool
- Parameters:
isDockable
- true if the tool contains components that can be dockedhasStatus
- true if the tool should display a status componentisModal
- true if the tool is modal, meaning that while this tool is visible, no other tool or dialog in Ghidra can have focus- Returns:
- a new DockingWindowManager
-
initActions
protected void initActions()Description copied from class:PluginTool
Placeholder for subclasses to get a chance to install actions before plugins.- Overrides:
initActions
in classPluginTool
-
getPluginClassManager
- Specified by:
getPluginClassManager
in classPluginTool
-
setToolName
- Overrides:
setToolName
in classPluginTool
-
getToolTemplate
- Overrides:
getToolTemplate
in classPluginTool
-
saveWindowingDataToXml
public org.jdom.Element saveWindowingDataToXml()- Overrides:
saveWindowingDataToXml
in classPluginTool
-
restoreWindowingDataFromXml
public void restoreWindowingDataFromXml(org.jdom.Element rootElement) - Overrides:
restoreWindowingDataFromXml
in classPluginTool
-
shouldSave
public boolean shouldSave()- Overrides:
shouldSave
in classPluginTool
-
doSaveTool
protected boolean doSaveTool()Description copied from class:PluginTool
Called when it is time to save the tool. Handles auto-saving logic.- Overrides:
doSaveTool
in classPluginTool
- Returns:
- true if a save happened
-
exit
public void exit()- Overrides:
exit
in classPluginTool
-
addManagePluginsAction
protected void addManagePluginsAction() -
showConfig
protected void showConfig() -
checkForNewExtensions
public void checkForNewExtensions()Looks for extensions that have been installed since the last time this tool was launched. If any are found, and if those extensions contain plugins, the user is notified and given the chance to install them.
-