void pushSelection( ProgramSelection newSelection ) {
            // only store a selection for later use if it is valid (restorable) and it is not 
            // the same as the incoming selection
            
            if ( newSelection == null ) {
                newSelection = NUMPTY_SELECTION;
            }
            
            if ( activeSelection.equals( newSelection ) ) {
                return;
            }
            
            if ( !NUMPTY_SELECTION.equals( activeSelection ) ) {
                previousRestoreSelection = activeSelection;
            }
            
            activeSelection = newSelection;
        }
A state class to keep track of past and current selections and to determine when we can
restore an old selection.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/select/RestoreSelectionPlugin.java