void restoreDataStateFromXml(Element root) {
		Map<String, SaveState> map = new HashMap<>();
		Iterator<?> iter = root.getChildren("PLUGIN").iterator();
		while (iter.hasNext()) {
			Element elem = (Element) iter.next();
			String pluginName = elem.getAttributeValue("NAME");

			SaveState saveState = new SaveState(elem);
			map.put(pluginName, saveState);
		}

		Map<String, Exception> badMap = new LinkedHashMap<>();
		List<Plugin> plugins = getPluginsByServiceOrder(0);
		for (Plugin p : plugins) {
			SaveState saveState = map.get(p.getName());
			if (saveState != null) {
				try {
					p.readDataState(saveState);
				}
				catch (Exception e) {
					badMap.put(p.getName(), e);
				}
			}
		}
		if (badMap.size() > 0) {
			log.error("*** Errors in Plugin Data States  ***");
			log.error("The data states for following plugins could not be restored:");
			Set<Entry<String, Exception>> entrySet = badMap.entrySet();
			for (Entry<String, Exception> entry : entrySet) {
				String pluginName = entry.getKey();
				Exception exception = entry.getValue();
				log.error("     " + pluginName, exception);
			}
			log.error("*** (finished) Errors in Plugin Data States  ***");
			Msg.showError(this, null, "Data State Error",
				"Errors in plugin data states - check console for details");
		}
		plugins.forEach(Plugin::dataStateRestoreCompleted);
	}
Restore the data state from the given XML element.
@param root XML element containing plugins' data state
Ghidra/Framework/Project/src/main/java/ghidra/framework/plugintool/PluginManager.java