private void restoreUndoRedoState(Map<Long, Object> stateMap, DomainObject domainObject,
			P provider) {
		if (provider == null) {
			return;
		}
		Object state = stateMap.get(provider.getInstanceID());
		if (state != null) {
			provider.restoreUndoRedoState(domainObject, state);
		}
	}
Tells the Plugin to write any data-dependent state to the output stream.
Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/byteviewer/AbstractByteViewerPlugin.java