{
IWorkspace workspace = ResourcesPlugin.getWorkspace();
ResourceChangeListener rcl = new ResourceChangeListener();
workspace.addResourceChangeListener(rcl);
try{
IUndoManager manager = RefactoringCore.getUndoManager();
if(commandLine.hasOption(Options.PEEK_OPTION)){
return manager.peekUndoName();
}
manager.performRedo(null, null);
return rcl.getChangedFiles();
}finally{
workspace.removeResourceChangeListener(rcl);
}
}