public static void removeInvalidPlugins(ToolTemplate template) {
		// parse the XML to see what plugins are loaded
		Element xmlRoot = template.saveToXml();

		// get out the tool element of the high-level tool
		Element toolElement = xmlRoot.getChild("TOOL");

		// the content of the tool xml consists of:
		// -option manager content
		// -plugin manager content
		// -window manager content

		// plugins are stored by adding content from SaveState objects, one per
		// plugin
		List<?> children = toolElement.getChildren("PLUGIN");
		Object[] childArray = children.toArray(); // we may modify this list,
		// so we need an array
		for (Object object : childArray) {
			Element pluginElement = (Element) object;
			Attribute classAttribute = pluginElement.getAttribute("CLASS");
			String value = classAttribute.getValue();

			// check to see if we can still find the plugin class (it may have
			// been removed)
			try {
				Class.forName(value);
			}
			catch (Throwable t) {
				// oh well, leave it out
				// TOOL: should we inform the user about these at some point?
				LOGGER.info("Removing invalid plugin " + pluginElement.getAttributeValue("CLASS") +
					" from tool: " + template.getName());
				toolElement.removeContent(pluginElement);
			}
		}

		// force the changes
		template.restoreFromXml(xmlRoot);
	}
Returns all tools found in the classpath that live under a root
'defaultTools' directory or a root 'extraTools' directory

@return the tools
Ghidra/Framework/Project/src/main/java/ghidra/framework/ToolUtils.java