Package ghidra.framework.model
Interface ToolTemplate
- All Known Implementing Classes:
GhidraToolTemplate
public interface ToolTemplate
Configuration of a tool that knows how to create tools.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateTool
(Project project) Creates a tool like only this template knows how.getIcon()
Get the icon for this tool template.Get the iconURL for this tool templategetName()
Get the name for the tool.getPath()
Returns the path from whence this tool template came; may be null if the tool was not loaded from the filesystemClass<?>[]
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
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
Save this object to an XML Element.void
Set the name for the tool template.
-
Field Details
-
TOOL_XML_NAME
- See Also:
-
TOOL_NAME_XML_NAME
- See Also:
-
TOOL_INSTANCE_NAME_XML_NAME
- See Also:
-
-
Method Details
-
getName
String getName()Get the name for the tool.- Returns:
- the name
-
getPath
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
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
ImageIcon getIcon()Get the icon for this tool template. This is equivalent to callinggetIconURL().getIcon()
- Returns:
- the icon for this tool template.
-
getSupportedDataTypes
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
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.
-