messages.push(nls.localize('externalRemoval',"The following files have been closed: {0}.",externalRemoval.join(', ')));
messages.push(nls.localize('externalRemoval',"The following files have been closed and modified on disk: {0}.",externalRemoval.join(', ')));
}
if(noParallelUniverses.length>0){
messages.push(nls.localize('noParallelUniverses',"The following files have been modified in an incompatible way: {0}.",noParallelUniverses.join(', ')));
...
...
@@ -386,7 +387,7 @@ export class UndoRedoService implements IUndoRedoService {
constmessage=nls.localize('cannotWorkspaceUndo',"Could not undo '{0}' across all files. {1}",element.label,element.invalidatedResources.createMessage());
this._notificationService.info(message);
...
...
@@ -470,7 +486,7 @@ export class UndoRedoService implements IUndoRedoService {
constverificationError=this._checkWorkspaceUndo(resource,element,affectedEditStacks,/*invalidated resources will be checked after the prepare call*/false);
if(verificationError){
returnverificationError.returnValue;
}
...
...
@@ -492,29 +508,44 @@ export class UndoRedoService implements IUndoRedoService {
);
if(result.choice===2){
// cancel
// choice: cancel
return;
}
if(result.choice===1){
// undo this file
// choice: undo this file
this._splitPastWorkspaceElement(element,null);
returnthis.undo(resource);
}
// undo in all files
// choice: undo in all files
// At this point, it is possible that the element has been made invalid in the meantime (due to the confirmation await)
constverificationError1=this._checkWorkspaceUndo(resource,element,affectedEditStacks,/*invalidated resources will be checked after the prepare call*/false);
if(verificationError1){
returnverificationError1.returnValue;
}
// prepare
letcleanup:IDisposable;
try{
cleanup=awaitthis._invokePrepare(element);
}catch(err){
returnthis._onError(err,element);
}
// At this point, it is possible that the element has been made invalid in the meantime (due to the prepare await)
constverificationError2=this._checkWorkspaceUndo(resource,element,affectedEditStacks,/*now also check that there are no more invalidated resources*/true);
constmessage=nls.localize('cannotWorkspaceRedo',"Could not redo '{0}' across all files. {1}",element.label,element.invalidatedResources.createMessage());
this._notificationService.info(message);
...
...
@@ -610,8 +641,26 @@ export class UndoRedoService implements IUndoRedoService {
constverificationError=this._checkWorkspaceRedo(resource,element,affectedEditStacks,/*invalidated resources will be checked after the prepare call*/false);
// At this point, it is possible that the element has been made invalid in the meantime (due to the prepare await)
constverificationError=this._checkWorkspaceRedo(resource,element,affectedEditStacks,/*now also check that there are no more invalidated resources*/true);
if(verificationError){
cleanup.dispose();
returnverificationError.returnValue;
}
...
...
@@ -619,7 +668,7 @@ export class UndoRedoService implements IUndoRedoService {