private void searchOptionsChanged(ToolOptions options, String optionName, Object oldValue,
			Object newValue) {

		if (optionName.equals(SEARCH_LIMIT_NAME)) {
			int limit = (int) newValue;
			if (limit <= 0) {
				throw new OptionsVetoException("Search limit must be greater than 0");
			}
		}

		loadSearchOptions(options);

	}
Class for managing search tool options.
Ghidra/Features/Base/src/main/java/ghidra/features/base/memsearch/gui/MemorySearchOptions.java