public void redo ( ) { // If there is at least one command to redo if ( this . undoneStack . size ( ) > 0 ) { // add the last undone command on the command stack this . commandStack . add ( this . undoneStack . get ( this . undoneStack . size ( ) - 1 ) ) ; // remove the command to redo of the undone stack. this . undoneStack . remove ( this . undoneStack . size ( ) - 1 ) ; // Call Redo method this . commandStack . get ( this . commandStack . size ( ) - 1 ) . run ( WBuilder . wave ( ) . addDatas ( WBuilder . waveData ( UndoRedoWaves . UNDO_REDO , false ) ) ) ; } else { // End of stack, do nothing LOGGER . info ( "No more command to redo, end of stack" ) ; } }
Redo the last command that was undo - ed .