protected void preRedo(){
  if (cursor >= 0 && cursor < selections.size()) {
    ISelection selection=selectionProvider.getSelection();
    selections.set(cursor,selection);
  }
 else   if (cursor == selections.size()) {
    ISelection selection=selectionProvider.getSelection();
    selections.add(cursor,selection);
  }
}

protected void preRedo ( ) { if ( cursor >= 0 && cursor < selections . size ( ) ) { ISelection selection = selectionProvider . getSelection ( ) ; selections . set ( cursor , selection ) ; } else if ( cursor == selections . size ( ) ) { ISelection selection = selectionProvider . getSelection ( ) ; selections . add ( cursor , selection ) ; } }
snapshots the current selection and push it into the stack if there ' s no selection on the current position before a command is about to be redone .
