@Override
	public void registerOption(String optionName, OptionType type, Object defaultValue,
			HelpLocation help, String description, Supplier<PropertyEditor> editorSupplier) {

		if (type == OptionType.NO_TYPE) {
			throw new IllegalArgumentException(
				"Can't register an option of type: " + OptionType.NO_TYPE);
		}

		if (type == OptionType.COLOR_TYPE) {
			warnShouldUseTheme("Color");
		}
		if (type == OptionType.FONT_TYPE) {
			warnShouldUseTheme("font");
		}
		if (type == OptionType.KEYSTROKE_TYPE) {
			type = OptionType.ACTION_TRIGGER;
			if (defaultValue instanceof KeyStroke) {
				defaultValue = new ActionTrigger((KeyStroke) defaultValue);
			}
			if (editorSupplier != null) {
				Msg.error(this, "Custom KeyStroke property editors are no longer supported.  " +
					"Use ActionTrigger instead");
				editorSupplier = null;
			}
		}

		if (!type.isCompatible(defaultValue)) {
			throw new IllegalStateException(
				"Given default value does not match the given OptionType! OptionType = " + type +
					", defaultValue = " + defaultValue);
		}

		editorSupplier = Dummy.ifNull(editorSupplier);
		PropertyEditor editor = null;
		boolean isHeadless = SystemUtilities.isInHeadlessMode();
		if (!isHeadless) {
			editor = editorSupplier.get();
		}

		if (type == OptionType.CUSTOM_TYPE) {
			if (!isHeadless && editor == null) {
				throw new IllegalStateException(
					"Can't register a custom option without a property editor");
			}
		}

		if (description == null) {
			Msg.error(this, "Registered an option without a description: " + optionName,
				ReflectionUtilities.createJavaFilteredThrowable());
		}

		synchronized (this) {

			Option currentOption = getExistingComptibleOption(optionName, type);
			if (currentOption != null) {
				currentOption.updateRegistration(description, help, defaultValue, editor);
				return;
			}

			Option option =
				createRegisteredOption(optionName, type, description, help, defaultValue, editor);
			valueMap.put(optionName, option);
		}
	}
Sets the name for this Options object.  Used when updating old options names to new names.
@param newName the new name for this options object.
Ghidra/Framework/Gui/src/main/java/ghidra/framework/options/AbstractOptions.java