void closeTool(PluginTool tool) {

		// find the workspace running the tool
		for (Workspace element : workspaces) {
			WorkspaceImpl ws = (WorkspaceImpl) element;
			PluginTool[] tools = ws.getTools();
			for (PluginTool tool2 : tools) {
				if (tool == tool2) {
					ws.closeRunningTool(tool);
					return;
				}
			}
		}
	}
Close a tool.

@param tool tool to be closed.
Ghidra/Framework/Project/src/main/java/ghidra/framework/project/tool/ToolManagerImpl.java