Package ghidra.framework.model
Interface ToolTemplate
-
- All Known Implementing Classes:
GhidraToolTemplate
public interface ToolTemplateConfiguration of a tool that knows how to create tools.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringTOOL_INSTANCE_NAME_XML_NAMEstatic java.lang.StringTOOL_NAME_XML_NAMEstatic java.lang.StringTOOL_XML_NAME
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ToolcreateTool(Project project)Creates a tool like only this template knows how.javax.swing.ImageIcongetIcon()Get the icon for this tool template.ToolIconURLgetIconURL()Get the iconURL for this tool template.java.lang.StringgetName()Get the name for the tool.java.lang.StringgetPath()Returns the path from whence this tool template came; may be null if the tool was not loaded from the filesystemjava.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.ElementgetToolElement()This returns the XML element that represents the tool part of the overall XML hierarchy.voidrestoreFromXml(org.jdom.Element root)Restore this object from a saved XML element.org.jdom.ElementsaveToXml()Save this object to an XML Element.voidsetName(java.lang.String name)Set the name for the tool template.
-
-
-
Field Detail
-
TOOL_XML_NAME
static final java.lang.String TOOL_XML_NAME
- See Also:
- Constant Field Values
-
TOOL_NAME_XML_NAME
static final java.lang.String TOOL_NAME_XML_NAME
- See Also:
- Constant Field Values
-
TOOL_INSTANCE_NAME_XML_NAME
static final java.lang.String TOOL_INSTANCE_NAME_XML_NAME
- See Also:
- Constant Field Values
-
-
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.
-
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
Tool 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.
-
-