@Override
	public void writeDataState(SaveState saveState) {
		if (editRefDialog != null) {
			SaveState state = new SaveState("EditReferenceDialogState");
			editRefDialog.writeDataState(state);
			saveState.putXmlElement("EditReferenceDialogState", state.saveToXml());
		}
	}
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