@Override
	public void readDataState(SaveState saveState) {
		Element element = saveState.getXmlElement("EditReferenceDialogState");
		if (element != null) {
			if (editRefDialog == null) {
				editRefDialog = new EditReferenceDialog(this);
			}
			SaveState state = new SaveState(element);
			editRefDialog.readDataState(state);
		}
	}
Add memory reference

@param fromCodeUnit
@param opIndex
@param toAddr
@param isOffsetRef
@param offset
@param refType
@return true if add was successful
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/references/ReferencesPlugin.java