public static PluginTool getTool(Project project, String toolName) {

		ToolManager tm = project.getToolManager();

		// first get the active workspace that will contain the tool
		Workspace[] workspaces = tm.getWorkspaces();

		// the front end will know which one is the active one; just
		// use the first one for the testing
		Workspace activeWorkspace = workspaces[0];

		PluginTool tool = null;
		if (toolName == null) {
			// create a new empty tool
			tool = activeWorkspace.createTool();
		}
		else {
			// if the toolName is specified, get the tool from the project
			// toolchest, and run the tool in the workspace
			ToolChest toolChest = project.getLocalToolChest();
			ToolTemplate toolTemplate = toolChest.getToolTemplate(toolName);
			tool = activeWorkspace.runTool(toolTemplate);
		}

		return tool;
	}
Launch a tool.
@param project the project to which the tool belongs
@param toolName name of the tool to get from the active workspace.
If null, launch a new empty tool in the active workspace.
@return the tool
Ghidra/Features/Base/src/main/java/ghidra/test/ProjectTestUtils.java