Package ghidra.framework.project.tool
Class GhidraToolTemplate
java.lang.Object
ghidra.framework.project.tool.GhidraToolTemplate
- All Implemented Interfaces:
- ToolTemplate
Implementation for a tool template that has the class names of the
 plugins that are part of the tool, and the tool's icon.
- 
Field SummaryFieldsFields inherited from interface ghidra.framework.model.ToolTemplateTOOL_INSTANCE_NAME_XML_NAME, TOOL_NAME_XML_NAME, TOOL_XML_NAME
- 
Constructor SummaryConstructorsConstructorDescriptionGhidraToolTemplate(ToolIconURL iconURL, org.jdom.Element toolElement, Class<?>[] supportedDataTypes) GhidraToolTemplate(org.jdom.Element root, String path) Constructor.
- 
Method SummaryModifier and TypeMethodDescriptioncreateTool(Project project) Creates a tool like only this template knows how.booleangetIcon()Get the icon for this tool template.Get the icon URL.getName()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.ElementThis returns the XML element that represents the tool part of the overall XML hierarchy.inthashCode()voidrestoreFromXml(org.jdom.Element root) Restore this object from a saved XML element.org.jdom.ElementSave this object to an XML Element.voidsetIconURL(ToolIconURL url) voidSet the name for the tool template.toString()
- 
Field Details- 
TEMPLATE_NAME
 
- 
- 
Constructor Details- 
GhidraToolTemplateConstructor.- Parameters:
- root- XML element that contains the tool template data
- path- the path of the template
 
- 
GhidraToolTemplatepublic GhidraToolTemplate(ToolIconURL iconURL, org.jdom.Element toolElement, Class<?>[] supportedDataTypes) 
 
- 
- 
Method Details- 
getNameDescription copied from interface:ToolTemplateGet the name for the tool.- Specified by:
- getNamein interface- ToolTemplate
- Returns:
- the name
 
- 
getPathDescription copied from interface:ToolTemplateReturns the path from whence this tool template came; may be null if the tool was not loaded from the filesystem- Specified by:
- getPathin interface- ToolTemplate
- Returns:
- the path
 
- 
setNameDescription copied from interface:ToolTemplateSet the name for the tool template.- Specified by:
- setNamein interface- ToolTemplate
- Parameters:
- name- new tool template name
 
- 
getIconDescription copied from interface:ToolTemplateGet the icon for this tool template. This is equivalent to callinggetIconURL().getIcon()- Specified by:
- getIconin interface- ToolTemplate
- Returns:
- the icon for this tool template.
 
- 
getSupportedDataTypesDescription copied from interface:ToolTemplateGet the classes of the data types that this tool supports, i.e., what data types can be dropped onto this tool.- Specified by:
- getSupportedDataTypesin interface- ToolTemplate
- Returns:
- list of supported data type classes.
 
- 
getIconURLGet the icon URL.- Specified by:
- getIconURLin interface- ToolTemplate
- Returns:
- the iconURL for this tool template
 
- 
hashCodepublic int hashCode()
- 
equals
- 
toString
- 
restoreFromXmlpublic void restoreFromXml(org.jdom.Element root) Description copied from interface:ToolTemplateRestore this object from a saved XML element.- Specified by:
- restoreFromXmlin interface- ToolTemplate
- Parameters:
- root- element to restore this object into
 
- 
saveToXmlpublic org.jdom.Element saveToXml()Description copied from interface:ToolTemplateSave this object to an XML Element.- Specified by:
- saveToXmlin interface- ToolTemplate
- Returns:
- the ToolConfig saved as an XML element
 
- 
setIconURL
- 
getToolElementpublic org.jdom.Element getToolElement()Description copied from interface:ToolTemplateThis returns the XML element that represents the tool part of the overall XML hierarchy.- Specified by:
- getToolElementin interface- ToolTemplate
- Returns:
- the XML element that represents the tool part of the overall XML hierarchy.
 
- 
createToolDescription copied from interface:ToolTemplateCreates a tool like only this template knows how.- Specified by:
- createToolin interface- ToolTemplate
- Parameters:
- project- the project in which the tool will be living.
- Returns:
- a new tool for this template implementation.
 
 
-