protected Map<String, ValStr<?>> loadLauncherArgsFromState(SaveState state,
			Map<String, LaunchParameter<?>> params) {
		Map<String, ValStr<?>> defaultArgs = generateDefaultLauncherArgs(params);
		if (state == null) {
			return defaultArgs;
		}
		Map<String, ValStr<?>> args = new LinkedHashMap<>();
		Set<String> names = Set.of(state.getNames());
		for (LaunchParameter<?> param : params.values()) {
			String key = "param_" + param.name();
			if (!names.contains(key)) {
				args.put(param.name(), defaultArgs.get(param.name()));
				continue;
			}
			String str = state.getString(key, null);
			if (str != null) {
				args.put(param.name(), param.decode(str));
				continue;
			}
			// NB: This code handles parameters formatted via a previous version.
			//   The try-catch was introduced to avoid NPEs from null file paths
			try {
				// Perhaps wrong type; was saved in older version.
				Object fallback = ConfigStateField.getState(state, param.type(), param.name());
				if (fallback != null) {
					args.put(param.name(), ValStr.from(fallback));
					continue;
				}
				Msg.warn(this, "Could not load saved launcher arg '%s' (%s)".formatted(param.name(),
					param.display()));
			}
			catch (Exception e) {
				Msg.warn(this, "Could not load saved launcher arg '%s' (%s) - %s".formatted(param.name(),
					param.display(), e.getMessage()));
			}
		}
		return args;
	}
Load the arguments last used for this offer, or give the defaults

<p>
If there are no saved "last used" arguments, then this will return the defaults. If there are
saved arguments, but they cannot be loaded, then this will behave differently depending on
whether the user will be confirming the arguments. If there will be no prompt/confirmation,
then this method must throw an exception in order to avoid launching with defaults, when the
user may be expecting a customized launch. If there will be a prompt, then this may safely
return the defaults, since the user will be given a chance to correct them.

@param forPrompt true if the user will be confirming the arguments
@return the loaded arguments, or defaults
Ghidra/Debug/Debugger-rmi-trace/src/main/java/ghidra/app/plugin/core/debug/gui/tracermi/launcher/AbstractTraceRmiLaunchOffer.java