private WrappedOption wrapOption(Option option) {

		Object value = null;
		value = option.getCurrentValue();
		if (value == null) {
			value = option.getDefaultValue();
		}

		if (value == null) {
			// nothing to wrap
			return null;
		}

		if (value instanceof CustomOption) {
			return new WrappedCustomOption((CustomOption) value);
		}
		if (value instanceof Color) {
			return new WrappedColor((Color) value);
		}
		if (value instanceof Font) {
			return new WrappedFont((Font) value);
		}
		if (value instanceof KeyStroke) {
			return new WrappedKeyStroke((KeyStroke) value);
		}
		if (value instanceof ActionTrigger) {
			return new WrappedActionTrigger((ActionTrigger) value);
		}
		if (value instanceof File) {
			return new WrappedFile((File) value);
		}
		if (value instanceof Date) {
			return new WrappedDate((Date) value);
		}
		throw new AssertException(
			"Attempted to wrap object of unexpected class type: " + value.getClass());
	}
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