public Element saveToXml() {

		Element root = new Element("TOOL_MANAGER");
		root.setAttribute("ACTIVE_WORKSPACE", activeWorkspace.getName());
		for (Workspace element : workspaces) {
			WorkspaceImpl ws = (WorkspaceImpl) element;
			root.addContent(ws.saveToXml());
		}
		Iterator<String> keys = connectMap.keySet().iterator();
		while (keys.hasNext()) {
			String key = keys.next();
			ToolConnectionImpl tc = connectMap.get(key);
			root.addContent(tc.saveToXml());
		}
		// reset the changed state back to "unchanged"
		changedWorkspaces.clear();
		activeWorkspaceChanged = false;
		return root;
	}
Saves this object to an XML element
@return the element containing the tool XML
Ghidra/Framework/Project/src/main/java/ghidra/framework/project/tool/ToolManagerImpl.java