void saveToXml(Element root, boolean includeConfigState) {

		pluginsConfiguration.savePluginsToXml(root, pluginList);

		if (!includeConfigState) {
			return;
		}

		SaveState saveState = new SaveState("PLUGIN_STATE");
		for (Plugin p : pluginList) {
			p.writeConfigState(saveState);
			if (!saveState.isEmpty()) {
				Element pluginElem = saveState.saveToXml();
				pluginElem.setAttribute("CLASS", p.getClass().getName());
				root.addContent(pluginElem);
				saveState = new SaveState("PLUGIN_STATE");
			}
		}
	}
Removes the given plugins from the tool and removes any other plugins that were
depending on them.
@param plugins the list of plugins to remove.
Ghidra/Framework/Project/src/main/java/ghidra/framework/plugintool/PluginManager.java