private Option getExistingComptibleOption(String optionName, OptionType type) {

		// There are several cases where an existing option may exist when registering an option
		// 1) the option was accessed before it was registered
		// 2) the option was loaded from a store (database or tool state)
		// 3) the option was registered more than once.
		//
		// The only time this is a problem is if the exiting option type is not compatible with
		// the type being registered.  If we encounter an incompatible option, we just log a
		// warning and return null so that the new option will replace it. Otherwise, we return
		// the existing option so it can be updated with the data from the registration.

		Option option = valueMap.get(optionName);
		if (option == null) {
			return null;
		}
		if (option.getOptionType() != type) {
			Msg.error(this, "Registered option incompatible with existing option: " + optionName,
				new AssertException());
			return null;
		}
		return 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