private void disconnectConnectedTools() {

		if (extraTools.isEmpty()) {
			return;
		}

		PluginTool[] tools = new PluginTool[extraTools.size()];
		extraTools.toArray(tools);
		for (PluginTool otherTool : tools) {
			disconnectTools(tool, otherTool);
			disconnectTools(otherTool, tool);
		}

		for (int i = 0; i < tools.length; i++) {
			PluginTool tool1 = tools[i];
			for (int j = 0; j < tools.length; j++) {
				if (i == j) {
					continue;
				}
				PluginTool tool2 = tools[j];
				disconnectTools(tool1, tool2);
				disconnectTools(tool2, tool1);
			}
		}
	}
Closes the given program, ignoring all changes, for each tool known to this TestEnv.

@param p the program to close
Ghidra/Features/Base/src/main/java/ghidra/test/TestEnv.java