Interface ToolTemplate

  • All Known Implementing Classes:
    GhidraToolTemplate

    public interface ToolTemplate
    Configuration of a tool that knows how to create tools.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      PluginTool createTool​(Project project)
      Creates a tool like only this template knows how.
      javax.swing.ImageIcon getIcon()
      Get the icon for this tool template.
      ToolIconURL getIconURL()
      Get the iconURL for this tool template
      java.lang.String getName()
      Get the name for the tool.
      java.lang.String getPath()
      Returns the path from whence this tool template came; may be null if the tool was not loaded from the filesystem
      java.lang.Class<?>[] getSupportedDataTypes()
      Get the classes of the data types that this tool supports, i.e., what data types can be dropped onto this tool.
      org.jdom.Element getToolElement()
      This returns the XML element that represents the tool part of the overall XML hierarchy.
      void restoreFromXml​(org.jdom.Element root)
      Restore this object from a saved XML element.
      org.jdom.Element saveToXml()
      Save this object to an XML Element.
      void setName​(java.lang.String name)
      Set the name for the tool template.
    • Method Detail

      • getName

        java.lang.String getName()
        Get the name for the tool.
        Returns:
        the name
      • getPath

        java.lang.String getPath()
        Returns the path from whence this tool template came; may be null if the tool was not loaded from the filesystem
        Returns:
        the path
      • setName

        void setName​(java.lang.String name)
        Set the name for the tool template.
        Parameters:
        name - new tool template name
      • getIconURL

        ToolIconURL getIconURL()
        Get the iconURL for this tool template
        Returns:
        the iconURL for this tool template
      • getIcon

        javax.swing.ImageIcon getIcon()
        Get the icon for this tool template. This is equivalent to calling getIconURL().getIcon()
        Returns:
        the icon for this tool template.
      • getSupportedDataTypes

        java.lang.Class<?>[] getSupportedDataTypes()
        Get the classes of the data types that this tool supports, i.e., what data types can be dropped onto this tool.
        Returns:
        list of supported data type classes.
      • saveToXml

        org.jdom.Element saveToXml()
        Save this object to an XML Element.
        Returns:
        the ToolConfig saved as an XML element
      • restoreFromXml

        void restoreFromXml​(org.jdom.Element root)
        Restore this object from a saved XML element.
        Parameters:
        root - element to restore this object into
      • createTool

        PluginTool createTool​(Project project)
        Creates a tool like only this template knows how.
        Parameters:
        project - the project in which the tool will be living.
        Returns:
        a new tool for this template implementation.
      • getToolElement

        org.jdom.Element getToolElement()
        This returns the XML element that represents the tool part of the overall XML hierarchy.
        Returns:
        the XML element that represents the tool part of the overall XML hierarchy.