void restoreToolStates(final boolean beforeState) {
		if (toolStates.isEmpty()) {
			return;
		}
		SystemUtilities.runSwingLater(new Runnable() {
			@Override
			public void run() {
				// flush events blocks so that current tool state and domain object are 
				// consistent prior to restore tool state
				domainObject.flushEvents();
				if (beforeState) {
					restoreToolStatesAfterUndo(domainObject);
				}
				else {
					restoreToolStatesAfterRedo(domainObject);
				}
			}
		});
	}
<code>DomainObjectDBTransaction</code> represents an atomic undoable operation performed
on a single domain object.
Ghidra/Framework/Project/src/main/java/ghidra/framework/data/DomainObjectDBTransaction.java