Java Code Examples for ghidra.framework.plugintool.PluginTool#saveToolToToolTemplate()

The following examples show how to use ghidra.framework.plugintool.PluginTool#saveToolToToolTemplate() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ToolServicesImpl.java    From ghidra with Apache License 2.0 5 votes vote down vote up
@Override
public void saveTool(PluginTool tool) {
	boolean toolChanged = tool.hasConfigChanged();
	ToolTemplate template = tool.saveToolToToolTemplate();
	toolManager.toolSaved(tool, toolChanged);
	toolChest.replaceToolTemplate(template);
	toolManager.setWorkspaceChanged((WorkspaceImpl) toolManager.getActiveWorkspace());
}
 
Example 2
Source File: ProjectTestUtils.java    From ghidra with Apache License 2.0 5 votes vote down vote up
/**
 * Save a tool to the project tool chest.
 * @param project The project which with the tool is associated.
 * @param tool The tool to be saved
 * @return The tool template for the given tool.
 */
public static ToolTemplate saveTool(Project project, PluginTool tool) {
	// save the tool to the project tool chest
	ToolChest toolChest = project.getLocalToolChest();
	ToolTemplate toolTemplate = tool.saveToolToToolTemplate();
	toolChest.addToolTemplate(toolTemplate);
	return toolTemplate;
}