private void installPrototypeExtensions(List<PrototypeModel> extensions) {
		if (usermodels == null) {
			if (extensions.isEmpty()) {
				return;		// No change to prototypes
			}
			usermodels = new TreeMap<>();
		}
		ArrayList<PrototypeModel> finalList = new ArrayList<>();
		TreeSet<String> currentNames = new TreeSet<>();
		for (PrototypeModel model : allmodels) {
			if (usermodels.containsKey(model.getName())) {
				continue;
			}
			currentNames.add(model.getName());
			finalList.add(model);		// Add original non-userdef models
		}

		usermodels.clear();
		for (PrototypeModel model : extensions) {
			if (currentNames.contains(model.getName())) {
				Msg.warn(this,
					"Cannot override prototype model " + model.getName() + " with extension");
				continue;
			}
			markPrototypeAsExtension(model);
			setDefaultReturnAddressIfNeeded(model);
			finalList.add(model);
			usermodels.put(model.getName(), model);
		}
		String defaultName = null;
		String evalName = null;
		String evalCalledName = null;
		if (defaultModel != null) {
			defaultName = defaultModel.getName();
		}
		if (evalCurrentModel != null) {
			evalName = evalCurrentModel.getName();
		}
		if (evalCalledModel != null) {
			evalCalledName = evalCalledModel.getName();
		}
		try {
			modelXrefs(finalList, defaultName, evalName, evalCalledName);
		}
		catch (XmlParseException e) {
			Msg.warn(this, "Prototype model extensions NOT installed: " + e.getMessage());
			usermodels.clear();
		}
		if (usermodels.isEmpty()) {
			usermodels = null;
		}
	}
Install a new set of user-defined (extension) prototype models. All the models from the
compiler spec are preserved. Any old user-defined models are removed or replaced.

@param extensions is the list of new user-defined models
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/ProgramCompilerSpec.java