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`

public class GhidraTool extends PluginTool
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

  Fields
  Modifier and Type
  Field
  Description
  `static boolean`
  `autoSave`

  ### Fields inherited from class ghidra.framework.plugintool.PluginTool

  `DESCRIPTION_PROPERTY_NAME, 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

  Constructors
  Constructor
  Description
  `GhidraTool(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 Type
  Method
  Description
  `protected void`
  `addManagePluginsAction()`
  `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 PluginsConfiguration`
  `createPluginsConfigurations()`
  `void`
  `dispose()`
  `protected boolean`
  `doSaveTool()`
  Called when it is time to save the tool.
  `ToolTemplate`
  `getToolTemplate(boolean includeConfigState)`
  `protected void`
  `initActions()`
  Placeholder for subclasses to get a chance to install actions before plugins.
  `protected boolean`
  `restoreFromXml(org.jdom.Element root)`
  `void`
  `restoreWindowingDataFromXml(org.jdom.Element rootElement)`
  `org.jdom.Element`
  `saveToXml(boolean includeConfigState)`
  `org.jdom.Element`
  `saveWindowingDataToXml()`
  `void`
  `setToolName(String name)`
  `void`
  `setVisible(boolean visible)`
  Sets the tool visible or invisible.
  `boolean`
  `shouldSave()`
  Returns true if this tool needs saving
  `protected void`
  `showConfig()`

  ### Methods inherited from class ghidra.framework.plugintool.PluginTool

  `accept, acceptDomainFiles, addEventListener, addExitAction, addExportToolAction, addHelpActions, addListenerForAllPluginEvents, addNextPreviousProviderActions, addOptionsAction, addPlugin, addPlugin, addPlugins, addPlugins, addPropertyChangeListener, addSaveToolAction, addServiceListener, addStatusComponent, addToolListener, allowTerminatingTasksWhenClosing, beep, cancelCurrentTask, canClose, canCloseDomainFile, canCloseDomainObject, canClosePlugins, canStopTasks, clearLastEvents, close, contextChanged, execute, execute, execute, execute, execute, executeBackgroundCommand, firePluginEvent, getActiveComponentProvider, getActiveWindow, getConsumedToolEventNames, getDomainFiles, getIcon, getIconURL, getInstanceName, getLocation, getManagedPlugins, getManagePluginsDialog, getName, getOptions, getOptions, getPluginsConfiguration, getProject, getProjectManager, getService, getServices, getSize, getSupportedDataTypes, getToolEventNames, getToolName, getToolServices, getTransientState, getUndoRedoToolState, hasOptions, hasToolListeners, hasUnsavedData, installHomeButton, installUtilityPlugins, isConfigurable, isExecutingCommand, isRestoringDataState, isService, isWindowsOnTop, optionsChanged, prepareToSave, processToolEvent, putInstanceName, registerDefaultContextProvider, registerOptionsNameChange, removeEventListener, removeListenerForAllPluginEvents, removePlugins, removePlugins, removePreferenceState, removePropertyChangeListener, removeServiceListener, removeStatusComponent, removeToolListener, restoreDataStateFromXml, restoreOptionsFromXml, restorePluginsFromXml, saveDataStateToXml, saveTool, saveToolAs, saveToolToToolTemplate, scheduleFollowOnCommand, setConfigChanged, setDefaultComponent, setIconURL, setLocation, setProject, setSize, setSubTitle, setUnconfigurable, setWindowsOnTop, showComponentHeader, showConfig, showDialog, showDialog, showDialogOnActiveWindow, showExtensions, threadIsBackgroundTaskThread, unregisterDefaultContextProvider`

  ### Methods inherited from class docking.AbstractDockingTool

  `addAction, addComponentProvider, addContextListener, addLocalAction, addPopupActionProvider, clearStatusInfo, getAllActions, getComponentProvider, getDockingActionsByOwnerName, getGlobalActions, getLocalActions, getProviderWindow, getStatusInfo, getToolActions, getToolFrame, getWindowManager, hasConfigChanged, isActive, isVisible, isVisible, removeAction, removeComponentProvider, removeContextListener, removeLocalAction, removePopupActionProvider, setMenuGroup, setMenuGroup, setStatusInfo, setStatusInfo, showComponentProvider, showDialog, toFront, toFront, updateTitle`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### autoSave

    public static boolean autoSave

- ## Constructor Details

  - ### GhidraTool

    public GhidraTool(Project project, String name)
    Construct a new Ghidra Tool.
    Parameters:
      `project` - the project associated with the tool
      `name` - the name of the tool

  - ### GhidraTool

    public GhidraTool(Project project, GhidraToolTemplate template)
    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 class `PluginTool`
    Parameters:
      `isDockable` - true if the tool contains components that can be docked
      `hasStatus` - true if the tool should display a status component
      `isModal` - 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 class `PluginTool`

  - ### createPluginsConfigurations

    protected PluginsConfiguration createPluginsConfigurations()
    Overrides:
      `createPluginsConfigurations` in class `PluginTool`

  - ### setToolName

    public void setToolName(String name)
    Overrides:
      `setToolName` in class `PluginTool`

  - ### getToolTemplate

    public ToolTemplate getToolTemplate(boolean includeConfigState)
    Overrides:
      `getToolTemplate` in class `PluginTool`

  - ### saveWindowingDataToXml

    public org.jdom.Element saveWindowingDataToXml()
    Overrides:
      `saveWindowingDataToXml` in class `PluginTool`

  - ### restoreWindowingDataFromXml

    public void restoreWindowingDataFromXml(org.jdom.Element rootElement)
    Overrides:
      `restoreWindowingDataFromXml` in class `PluginTool`

  - ### saveToXml

    public org.jdom.Element saveToXml(boolean includeConfigState)
    Overrides:
      `saveToXml` in class `PluginTool`

  - ### restoreFromXml

    protected boolean restoreFromXml(org.jdom.Element root)
    Overrides:
      `restoreFromXml` in class `PluginTool`

  - ### setVisible

    public void setVisible(boolean visible)
    Description copied from interface: `Tool`
    Sets the tool visible or invisible. This method is used by the Project to make it's tools visible or invisible depending on whether this tool is in is the active workspace.
    Specified by:
      `setVisible` in interface `Tool`
    Overrides:
      `setVisible` in class `AbstractDockingTool`
    Parameters:
      `visible` - true specifies that the tool should be visible

  - ### shouldSave

    public boolean shouldSave()
    Description copied from class: `PluginTool`
    Returns true if this tool needs saving
    Overrides:
      `shouldSave` in class `PluginTool`
    Returns:
      true if this tool needs saving

  - ### 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 class `PluginTool`
    Returns:
      true if a save happened

  - ### dispose

    public void dispose()
    Overrides:
      `dispose` in class `PluginTool`

  - ### addManagePluginsAction

    protected void addManagePluginsAction()

  - ### showConfig

    protected void showConfig()