void functionChanged(boolean isRestore) {

		if (function.isDeleted()) {
			// Close the Editor.
			PluginTool tool = ((StackEditorProvider) provider).getPlugin().getTool();
			tool.setStatusInfo("Stack Editor was closed for " + provider.getName());
			provider.dispose();
			return;
		}

		updateAndCheckChangeState();

		boolean reload = true;
		if (hasChanges) {
			// The user has modified the structure so prompt for whether or
			// not to reload the structure.
			String text = isRestore ? "may have " : "";
			String question = "The function \"" + currentName + "\" " + text +
				"changed outside the editor.\n" + "Discard edits and reload the Stack Editor?";
			String title = "Reload Stack Editor?";
			int response = OptionDialog
					.showYesNoDialogWithNoAsDefaultButton(provider.getComponent(), title, question);
			if (response != 1) {
				reload = false;
			}
		}
		if (reload) {
			load(function);
		}
		else {
			stackChangedExternally(true);
			refresh();
		}
	}
Adds the specified data type at the specified component index. Whether
an insert or replace occurs depends on whether the indicated index is
in a selection and whether in locked or unlocked mode.

@param index the component index of where to add the data type.
@param dt the data type to add

@return true if the component is added, false if it doesn't.
@throws UsrException if add fails
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/stackeditor/StackEditorModel.java