@Override
	public void restoreTransientState(Object objectState) {

		doWithEventsDisabled(() -> {
			Object[] state = (Object[]) objectState;
			connectedProvider.restoreLocation((SaveState) state[0]);
			connectedProvider.setSelection((ProgramSelection) state[1]);
		});
	}
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