private void readSaveState(Plugin p, Map<String, SaveState> map, StringBuilder errMsg) {
		SaveState ss = map.get(p.getClass().getName());
		if (ss == null) {
			return;
		}

		try {
			p.readConfigState(ss);
		}
		catch (Exception e) {
			errMsg.append("Problem restoring plugin state for: " + p.getName()).append("\n\n");
			errMsg.append(e.getClass().getName()).append(": ").append(e.getMessage()).append('\n');
			StackTraceElement[] st = e.getStackTrace();
			int depth = Math.min(5, st.length); // only show the important stuff (magic guess)
			for (int j = 0; j < depth; j++) {
				errMsg.append("    ").append(st[j].toString()).append('\n');
			}
			errMsg.append('\n'); // extra break between this and future messages
		}
	}
Tries to find and pull in the plugin that provides a service.

@param dependency service class that someone depends on
@return boolean true if the dependency was fixed, false if it was not fixed.
Ghidra/Framework/Project/src/main/java/ghidra/framework/plugintool/PluginManager.java