private void writeWrappedOptions(boolean includeDefaultBindings, Element root) {
		for (String optionName : valueMap.keySet()) {
			Option option = valueMap.get(optionName);
			if (option instanceof ThemeColorOption || option instanceof ThemeFontOption) {
				// theme values are saved by the theme, no need to save them to the options
				continue;
			}

			if (includeDefaultBindings || !option.isDefault()) {
				Object value = option.getCurrentValue();
				if (isSupportedBySaveState(value)) {
					continue; // handled above
				}

				WrappedOption wrappedOption = wrapOption(option);
				if (wrappedOption == null) {
					continue; // cannot write an option without a value to determine its type
				}

				SaveState ss = new SaveState(WRAPPED_OPTION_NAME);
				Element elem = null;
				if (value == null) {
					// Handle the null case ourselves, not using the wrapped option (and when
					// reading from xml) so the logic does not need to be in each wrapped option
					elem = ss.saveToXml();
					elem.addContent(new Element(CLEARED_VALUE_ELEMENT_NAME));
				}
				else {
					wrappedOption.writeState(ss);
					elem = ss.saveToXml();
				}

				elem.setAttribute(NAME_ATTRIBUTE, optionName);
				elem.setAttribute(CLASS_ATTRIBUTE, wrappedOption.getClass().getName());
				root.addContent(elem);
			}
		}
	}
Return an XML element for the option names and values.
Note: only those options which have been explicitly set
will be included.

@param includeDefaultBindings true to include default key binding values in the xml
@return the xml root element
Ghidra/Framework/Gui/src/main/java/ghidra/framework/options/ToolOptions.java