public void restoreFromXml(Element root) {
		inRestoreMode = true;
		try {
			HashMap<String, PluginTool> toolMap = new HashMap<>();
			String activeWSName = root.getAttributeValue("ACTIVE_WORKSPACE");

			Workspace makeMeActive = null;
			List<?> l = root.getChildren("WORKSPACE");
			Iterator<?> it = l.iterator();
			while (it.hasNext()) {
				Element elem = (Element) it.next();
				WorkspaceImpl ws = new WorkspaceImpl("TEMP", this);
				ws.restoreFromXml(elem);
				workspaces.add(ws);
				wsMap.put(ws.getName(), ws);
				if (ws.getName().equals(activeWSName)) {
					makeMeActive = ws;
				}
				PluginTool[] tools = ws.getTools();
				for (PluginTool tool : tools) {
					toolMap.put(tool.getName(), tool);
				}
			}
			if (makeMeActive != null) {
				makeMeActive.setActive();
			}

			it = root.getChildren("CONNECTION").iterator();
			while (it.hasNext()) {
				Element elem = (Element) it.next();
				String producerName = elem.getAttributeValue("PRODUCER");
				String consumerName = elem.getAttributeValue("CONSUMER");
				// get the tools
				PluginTool producer = toolMap.get(producerName);
				PluginTool consumer = toolMap.get(consumerName);
				if (producer != null && consumer != null) {
					ToolConnectionImpl tc = new ToolConnectionImpl(producer, consumer);
					tc.restoreFromXml(elem);
					connectMap.put(producerName + "+" + consumerName, tc);
				}
			}
		}
		finally {
			inRestoreMode = false;
		}
	}
restores the object from an XML element

@param root root element of saved XML state
Ghidra/Framework/Project/src/main/java/ghidra/framework/project/tool/ToolManagerImpl.java