public void registerPreferenceStateSupplier(String key, Supplier<PreferenceState> supplier) {
		if (key == null) {
			throw new IllegalArgumentException("Key is null!");
		}

		preferenceStateMap.put(key, supplier);
	}
Registers a supplier of the preference state for the given key.  Using this method allows the
window manager to query the supplier when the tool is saved.  Clients can then decide whether
they have any state that needs saving at that time.

@param key the key with which to store the preferences.
@param supplier the supplier of the state object to store.
Ghidra/Framework/Docking/src/main/java/docking/DockingWindowManager.java