public void restoreFromXml(Element root) {
		listenerAdded = false;

		Iterator<?> iter = root.getChildren("EVENT").iterator();
		while (iter.hasNext()) {
			Element elem = (Element) iter.next();
			String name = elem.getAttributeValue("NAME");
			String state = elem.getAttributeValue("CONNECTED");
			boolean connected = (state != null && state.equalsIgnoreCase("true"));
			connectHt.put(name, (connected ? CONNECTED : DISCONNECTED));
			if (connected && !listenerAdded) {
				producerTool.addToolListener(this);
				listenerAdded = true;
			}
		}
	}
restores the ToolConnection from an XML element

@param root XML element to restore ToolConnection from.
Ghidra/Framework/Project/src/main/java/ghidra/framework/project/tool/ToolConnectionImpl.java