undoRedoService.ts ×43

Frontier kind: Joint frontier

unlabeled · c_4f5950d8b4bd

1 test · 7905 LOC · 40 files · introduces 1 test · 176 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
43 ranges176 lines · 1 files
Tests
1 test

Contains — complete concept membership

All code (extent)
1111 ranges7905 lines · 40 files · Browse complete extent
All tests (intent)
1 testBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Introduced files, introduced tests, and structurally relevant concept specializationundoRedoService.ts ×24 · 52 introduced LOCundoRedoService.ts ×24undoRedoService.ts ×2 · 5 introduced LOCundoRedoService.ts ×2undoRedoService.ts ×18 · 63 introduced LOCundoRedoService.ts ×18undoRedoService.ts ×1 · 2 introduced LOCundoRedoService.ts ×1undoRedoService.ts ×1 · 2 introduced LOCundoRedoService.ts ×1undoRedoService.ts ×7 · 8 introduced LOCundoRedoService.ts ×7undoRedoService.ts ×2 · 3 introduced LOCundoRedoService.ts ×2undoRedoService.ts ×9 · 31 introduced LOCundoRedoService.ts ×9undoRedoService.ts ×2 · 3 introduced LOCundoRedoService.ts ×2undoRedoService.ts ×1 · 6 introduced LOCundoRedoService.ts ×1undoRedo.ts ×2 · 4 introduced LOCundoRedo.ts ×2undoRedoService.ts ×83 · 299 introduced LOCundoRedoService.ts ×83testNotificationService.ts ×1 · 2 introduced LOCtestNotificationService.…testNotificationService.ts ×10 · 34 introduced LOCtestNotificationService.…dialogs.ts ×8 · 511 introduced LOCdialogs.ts ×8mock.ts ×1 · 3 introduced LOCmock.ts ×1notification.ts ×1 · 5 introduced LOCnotification.ts ×1notification.ts ×3 · 464 introduced LOCnotification.ts ×3mock.ts ×4 · 25 introduced LOCmock.ts ×4undoRedo.ts ×4 · 177 introduced LOCundoRedo.ts ×4resources.ts ×23 · 253 introduced LOCresources.ts ×23severity.ts ×3 · 32 introduced LOCseverity.ts ×3extensions.ts ×1 · 35 introduced LOCextensions.ts ×1network.ts ×20 · 292 introduced LOCnetwork.ts ×20descriptors.ts ×1 · 4 introduced LOCdescriptors.ts ×1strings.test|title=Strings trimWhitespace|occurrence=1 · 0 introduced LOCstrings.test|title=Strin…extpath.ts ×17 · 91 introduced LOCextpath.ts ×17instantiation.ts ×1 · 1 introduced LOCinstantiation.ts ×1descriptors.ts ×2 · 17 introduced LOCdescriptors.ts ×2strings.ts ×101 · 542 introduced LOCstrings.ts ×101cancellation.test|title=CancellationToken None|occurrence=1 · 0 introduced LOCcancellation.test|title=…cancellation.ts ×18 · 90 introduced LOCcancellation.ts ×18event.ts ×93 · 864 introduced LOCevent.ts ×93uri.test|title=URI URI#file, no path-is-uri check|occurrence=1 · 0 introduced LOCuri.test|title=URI URI#f…uri.ts ×1 · 1 introduced LOCuri.ts ×1uri.ts ×1 · 4 introduced LOCuri.ts ×1uri.ts ×1 · 5 introduced LOCuri.ts ×1uri.ts ×1 · 3 introduced LOCuri.ts ×1uri.ts ×1 · 1 introduced LOCuri.ts ×1uri.ts ×6 · 10 introduced LOCuri.ts ×6uri.ts ×1 · 2 introduced LOCuri.ts ×1uri.ts ×1 · 2 introduced LOCuri.ts ×1uri.ts ×8 · 28 introduced LOCuri.ts ×8uri.ts ×3 · 6 introduced LOCuri.ts ×3uri.ts ×1 · 3 introduced LOCuri.ts ×1uri.ts ×3 · 14 introduced LOCuri.ts ×3uri.ts ×10 · 20 introduced LOCuri.ts ×10nls.ts ×1 · 2 introduced LOCnls.ts ×1uri.ts ×3 · 3 introduced LOCuri.ts ×3uri.ts ×2 · 2 introduced LOCuri.ts ×2uri.ts ×3 · 3 introduced LOCuri.ts ×3uri.test|title=URI URI#file, win-speciale|occurrence=1, charCode.test|title=CharCode has good values|occurrence=1, +2 · 0 introduced LOCuri.test|title=URI URI#f…uri.ts ×2 · 10 introduced LOCuri.ts ×2utils.ts ×3 · 9 introduced LOCutils.ts ×3nls.ts ×1 · 1 introduced LOCnls.ts ×1uri.ts ×1 · 2 introduced LOCuri.ts ×1instantiation.ts ×4 · 10 introduced LOCinstantiation.ts ×4nls.ts ×3 · 9 introduced LOCnls.ts ×3uri.ts ×9 · 37 introduced LOCuri.ts ×9nls.ts ×1 · 1 introduced LOCnls.ts ×1linkedList.ts ×13 · 44 introduced LOClinkedList.ts ×13nls.ts ×6 · 13 introduced LOCnls.ts ×6instantiation.ts ×5 · 111 introduced LOCinstantiation.ts ×5lifecycle.ts ×2 · 4 introduced LOClifecycle.ts ×2lifecycle.ts ×1 · 2 introduced LOClifecycle.ts ×1lifecycle.ts ×4 · 8 introduced LOClifecycle.ts ×4lifecycle.ts ×6 · 16 introduced LOClifecycle.ts ×6lazy.ts ×1 · 2 introduced LOClazy.ts ×1lazy.ts ×3 · 37 introduced LOClazy.ts ×3lifecycle.ts ×1 · 2 introduced LOClifecycle.ts ×1lifecycle.ts ×1 · 2 introduced LOClifecycle.ts ×1uint.ts ×2 · 43 introduced LOCuint.ts ×2lifecycle.ts ×1 · 3 introduced LOClifecycle.ts ×1map.ts ×97 · 3334 introduced LOCmap.ts ×97src/vs/base/common/arrays.ts · 949 LOCcommon/arrays.tssrc/vs/base/common/arraysFind.ts · 226 LOCcommon/arraysFind.tssrc/vs/base/common/assert.ts · 91 LOCcommon/assert.tssrc/vs/base/common/cache.ts · 153 LOCcommon/cache.tssrc/vs/base/common/cancellation.ts · 206 LOCcommon/cancellation.tssrc/vs/base/common/charCode.ts · 450 LOCcommon/charCode.tssrc/vs/base/common/collections.ts · 176 LOCcommon/collections.tssrc/vs/base/common/errors.ts · 357 LOCcommon/errors.tssrc/vs/base/common/event.ts · 1964 LOCcommon/event.tssrc/vs/base/common/extpath.ts · 433 LOCcommon/extpath.tssrc/vs/base/common/functional.ts · 32 LOCcommon/functional.tssrc/vs/base/common/iterator.ts · 194 LOCcommon/iterator.tssrc/vs/base/common/lazy.ts · 57 LOCcommon/lazy.tssrc/vs/base/common/lifecycle.ts · 974 LOCcommon/lifecycle.tssrc/vs/base/common/linkedList.ts · 151 LOCcommon/linkedList.tssrc/vs/base/common/map.ts · 1016 LOCcommon/map.tssrc/vs/base/common/marshallingIds.ts · 33 LOCcommon/marshallingIds.tssrc/vs/base/common/network.ts · 440 LOCcommon/network.tssrc/vs/base/common/path.ts · 1589 LOCcommon/path.tssrc/vs/base/common/platform.ts · 281 LOCcommon/platform.tssrc/vs/base/common/process.ts · 76 LOCcommon/process.tssrc/vs/base/common/resources.ts · 444 LOCcommon/resources.tssrc/vs/base/common/severity.ts · 56 LOCcommon/severity.tssrc/vs/base/common/stopwatch.ts · 41 LOCcommon/stopwatch.tssrc/vs/base/common/strings.ts · 1413 LOCcommon/strings.tssrc/vs/base/common/types.ts · 410 LOCcommon/types.tssrc/vs/base/common/uint.ts · 59 LOCcommon/uint.tssrc/vs/base/common/uri.ts · 754 LOCcommon/uri.tssrc/vs/base/test/common/mock.ts · 47 LOCcommon/mock.tssrc/vs/base/test/common/utils.ts · 107 LOCcommon/utils.tssrc/vs/nls.ts · 244 LOCvs/nls.tssrc/vs/platform/dialogs/common/dialogs.ts · 626 LOCcommon/dialogs.tssrc/vs/platform/dialogs/test/common/testDialogService.ts · 65 LOCcommon/testDialogService…src/vs/platform/instantiation/common/descriptors.ts · 21 LOCcommon/descriptors.tssrc/vs/platform/instantiation/common/extensions.ts · 37 LOCcommon/extensions.tssrc/vs/platform/instantiation/common/instantiation.ts · 130 LOCcommon/instantiation.tssrc/vs/platform/notification/common/notification.ts · 491 LOCcommon/notification.tssrc/vs/platform/notification/test/common/testNotificationService.ts · 54 LOCcommon/testNotificationS…src/vs/platform/undoRedo/common/undoRedo.ts · 190 LOCcommon/undoRedo.tssrc/vs/platform/undoRedo/common/undoRedoService.ts · 1399 LOCcommon/undoRedoService.t…cancellation.test|title=CancellationToken None|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/cancellation.test|title=CancellationToken None|occurrence=1cancellation.test|title=…charCode.test|title=CharCode has good values|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/charCode.test|title=CharCode has good values|occurrence=1charCode.test|title=Char…path.test|title=Paths (Node Implementation) path|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/path.test|title=Paths (Node Implementation) path|occurrence=1path.test|title=Paths (N…strings.test|title=Strings trimWhitespace|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/strings.test|title=Strings trimWhitespace|occurrence=1strings.test|title=Strin…uri.test|title=URI File paths containing apostrophes break URI parsing and cannot be opened #276075|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/uri.test|title=URI File paths containing apostrophes break URI parsing and cannot be opened #276075|occurrence=1uri.test|title=URI File …uri.test|title=URI URI#file, no path-is-uri check|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/uri.test|title=URI URI#file, no path-is-uri check|occurrence=1uri.test|title=URI URI#f…uri.test|title=URI URI#file, win-speciale|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/uri.test|title=URI URI#file, win-speciale|occurrence=1uri.test|title=URI URI#f…undoRedoService.test|title=UndoRedoService UndoRedoGroup.None uses id 0|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/undoRedo/test/common/undoRedoService.test|title=UndoRedoService UndoRedoGroup.None uses id 0|occurrence=1undoRedoService.test|tit…undoRedoService.test|title=UndoRedoService multi resource elements|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/undoRedo/test/common/undoRedoService.test|title=UndoRedoService multi resource elements|occurrence=1undoRedoService.test|tit…Focused concept · undoRedoService.ts ×43 · 176 introduced LOCundoRedoService.ts ×43

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

1 test introduced at this concept.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

1 file ranked by introduced lines: 176 introduced LOC across 43 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/undoRedo/common/undoRedoService.ts 176 introduced LOC · 43 ranges

Open complete file

144
145 constructor(actual: IWorkspaceUndoRedoElement, resourceLabels: string[], strResources: string[], groupId: number, groupOrder: number, sourceId: number, sourceOrder: number) {
146 > this.actual = actual; undoRedoService.ts
147 > this.label = actual.label;
148 > this.confirmBeforeUndo = actual.confirmBeforeUndo || false;
149 > this.resourceLabels = resourceLabels;
150 > this.strResources = strResources;
151 > this.groupId = groupId;
152 > this.groupOrder = groupOrder;
153 > this.sourceId = sourceId;
154 > this.sourceOrder = sourceOrder;
155 > this.removedResources = null;
156 > this.invalidatedResources = null;
157 > }
158
159 public canSplit(): this is WorkspaceStackElement & { actual: { split(): IResourceUndoRedoElement[] } } {
160 > return (typeof this.actual.split === 'function'); undoRedoService.ts
161 > }
162
163 public removeResource(resourceLabel: string, strResource: string, reason: RemovedResourceReason): void {
444
445 public isValid(): boolean {
446 > for (let i = 0, len = this.editStacks.length; i < len; i++) { undoRedoService.ts
447 > if (this._versionIds[i] !== this.editStacks[i].versionId) {
448 return false;
449 }
451 > return true;
452 > }
453 }
454
509 this._pushElement(new ResourceStackElement(element, resourceLabel, strResource, group.id, group.nextOrder(), source.id, source.nextOrder()));
510 } else {
511 > const seen = new Set<string>(); undoRedoService.ts
512 > const resourceLabels: string[] = [];
513 > const strResources: string[] = [];
514 > for (const resource of element.resources) {
515 > const resourceLabel = getResourceLabel(resource);
516 > const strResource = this.getUriComparisonKey(resource);
517 >
518 > if (seen.has(strResource)) {
519 continue;
520 }
521 > seen.add(strResource); undoRedoService.ts
522 > resourceLabels.push(resourceLabel);
523 > strResources.push(strResource);
524 > }
525 >
526 > if (resourceLabels.length === 1) {
527 this._pushElement(new ResourceStackElement(element, resourceLabels[0], strResources[0], group.id, group.nextOrder(), source.id, source.nextOrder()));
528 > } else { undoRedoService.ts
529 > this._pushElement(new WorkspaceStackElement(element, resourceLabels, strResources, group.id, group.nextOrder(), source.id, source.nextOrder()));
530 > }
531 > }
532 if (DEBUG) {
533 this._print('pushElement');
773
774 private async _invokeWorkspacePrepare(element: WorkspaceStackElement): Promise<IDisposable> {
775 > if (typeof element.actual.prepareUndoRedo === 'undefined') { undoRedoService.ts
776 > return Disposable.None;
777 > }
778 const result = element.actual.prepareUndoRedo();
779 if (typeof result === 'undefined') {
781 }
782 return result;
784
785 private _invokeResourcePrepare(element: ResourceStackElement, callback: (disposable: IDisposable) => Promise<void> | void): void | Promise<void> {
805
806 private _getAffectedEditStacks(element: WorkspaceStackElement): EditStackSnapshot {
807 > const affectedEditStacks: ResourceEditStack[] = []; undoRedoService.ts
808 > for (const strResource of element.strResources) {
809 > affectedEditStacks.push(this._editStacks.get(strResource) || missingEditStack);
810 > }
811 > return new EditStackSnapshot(affectedEditStacks);
812 > }
813
814 private _tryToSplitAndUndo(strResource: string, element: WorkspaceStackElement, ignoreResources: RemovedResources | null, message: string): WorkspaceVerificationError {
828
829 private _checkWorkspaceUndo(strResource: string, element: WorkspaceStackElement, editStackSnapshot: EditStackSnapshot, checkInvalidatedResources: boolean): WorkspaceVerificationError | null {
830 > if (element.removedResources) { undoRedoService.ts
831 return this._tryToSplitAndUndo(
832 strResource,
839 );
840 }
841 > if (checkInvalidatedResources && element.invalidatedResources) { undoRedoService.ts
842 return this._tryToSplitAndUndo(
843 strResource,
850 );
851 }
853 > // this must be the last past element in all the impacted resources!
854 > const cannotUndoDueToResources: string[] = [];
855 > for (const editStack of editStackSnapshot.editStacks) {
856 > if (editStack.getClosestPastElement() !== element) {
857 cannotUndoDueToResources.push(editStack.resourceLabel);
858 }
860 > if (cannotUndoDueToResources.length > 0) {
861 return this._tryToSplitAndUndo(
862 strResource,
869 );
870 }
872 > const cannotLockDueToResources: string[] = [];
873 > for (const editStack of editStackSnapshot.editStacks) {
874 > if (editStack.locked) {
875 cannotLockDueToResources.push(editStack.resourceLabel);
876 }
878 > if (cannotLockDueToResources.length > 0) {
879 return this._tryToSplitAndUndo(
880 strResource,
887 );
888 }
890 > // check if new stack elements were added in the meantime...
891 > if (!editStackSnapshot.isValid()) {
892 return this._tryToSplitAndUndo(
893 strResource,
900 );
901 }
903 > return null;
904 > }
905
906 private _workspaceUndo(strResource: string, element: WorkspaceStackElement, undoConfirmed: boolean): Promise<void> | void {
907 > const affectedEditStacks = this._getAffectedEditStacks(element); undoRedoService.ts
908 > const verificationError = this._checkWorkspaceUndo(strResource, element, affectedEditStacks, /*invalidated resources will be checked after the prepare call*/false);
909 > if (verificationError) {
910 return verificationError.returnValue;
911 }
912 > return this._confirmAndExecuteWorkspaceUndo(strResource, element, affectedEditStacks, undoConfirmed); undoRedoService.ts
913 > }
914
915 private _isPartOfUndoGroup(element: WorkspaceStackElement): boolean {
916 > if (!element.groupId) { undoRedoService.ts
917 > return false;
918 > }
919 // check that there is at least another element with the same groupId ready to be undone
920 for (const [, editStack] of this._editStacks) {
936 }
937 return false;
939
940 private async _confirmAndExecuteWorkspaceUndo(strResource: string, element: WorkspaceStackElement, editStackSnapshot: EditStackSnapshot, undoConfirmed: boolean): Promise<void> {
942 > if (element.canSplit() && !this._isPartOfUndoGroup(element)) {
943 > // this element can be split
944 >
945 > enum UndoChoice {
946 > All = 0,
947 > This = 1,
948 > Cancel = 2
949 > }
950 >
951 > const { result } = await this._dialogService.prompt<UndoChoice>({
952 > type: Severity.Info,
953 > message: nls.localize('confirmWorkspace', "Would you like to undo '{0}' across all files?", element.label),
954 > buttons: [
955 > {
956 > label: nls.localize({ key: 'ok', comment: ['{0} denotes a number that is > 1, && denotes a mnemonic'] }, "&&Undo in {0} Files", editStackSnapshot.editStacks.length),
957 > run: () => UndoChoice.All
958 > },
959 > {
960 > label: nls.localize({ key: 'nok', comment: ['&& denotes a mnemonic'] }, "Undo this &&File"),
961 > run: () => UndoChoice.This
962 > }
963 > ],
964 > cancelButton: {
965 > run: () => UndoChoice.Cancel
966 > }
967 > });
968 >
969 > if (result === UndoChoice.Cancel) {
970 // choice: cancel
971 return;
972 }
974 > if (result === UndoChoice.This) {
975 // choice: undo this file
976 this._splitPastWorkspaceElement(element, null);
977 return this._undo(strResource, 0, true);
978 }
980 > // choice: undo in all files
981 >
982 > // At this point, it is possible that the element has been made invalid in the meantime (due to the confirmation await)
983 > const verificationError1 = this._checkWorkspaceUndo(strResource, element, editStackSnapshot, /*invalidated resources will be checked after the prepare call*/false);
984 > if (verificationError1) {
985 return verificationError1.returnValue;
986 }
988 > undoConfirmed = true;
989 > }
990 >
991 > // prepare
992 > let cleanup: IDisposable;
993 > try {
994 > cleanup = await this._invokeWorkspacePrepare(element);
995 > } catch (err) {
996 return this._onError(err, element);
997 }
999 > // At this point, it is possible that the element has been made invalid in the meantime (due to the prepare await)
1000 > const verificationError2 = this._checkWorkspaceUndo(strResource, element, editStackSnapshot, /*now also check that there are no more invalidated resources*/true);
1001 > if (verificationError2) {
1002 cleanup.dispose();
1003 return verificationError2.returnValue;
1004 }
1006 > for (const editStack of editStackSnapshot.editStacks) {
1007 > editStack.moveBackward(element);
1008 > }
1009 > return this._safeInvokeWithLocks(element, () => element.actual.undo(), editStackSnapshot, cleanup, () => this._continueUndoInGroup(element.groupId, undoConfirmed));
1010 > }
1011
1012 private _resourceUndo(editStack: ResourceEditStack, element: ResourceStackElement, undoConfirmed: boolean): Promise<void> | void {
1105 try {
1106 if (element.type === UndoRedoElementType.Workspace) {
1107 > return this._workspaceUndo(strResource, element, undoConfirmed); undoRedoService.ts
1108 } else {
1109 return this._resourceUndo(editStack, element, undoConfirmed);
1184
1185 private _checkWorkspaceRedo(strResource: string, element: WorkspaceStackElement, editStackSnapshot: EditStackSnapshot, checkInvalidatedResources: boolean): WorkspaceVerificationError | null {
1186 > if (element.removedResources) { undoRedoService.ts
1187 return this._tryToSplitAndRedo(
1188 strResource,
1195 );
1196 }
1197 > if (checkInvalidatedResources && element.invalidatedResources) { undoRedoService.ts
1198 return this._tryToSplitAndRedo(
1199 strResource,
1206 );
1207 }
1209 > // this must be the last future element in all the impacted resources!
1210 > const cannotRedoDueToResources: string[] = [];
1211 > for (const editStack of editStackSnapshot.editStacks) {
1212 > if (editStack.getClosestFutureElement() !== element) {
1213 cannotRedoDueToResources.push(editStack.resourceLabel);
1214 }
1216 > if (cannotRedoDueToResources.length > 0) {
1217 return this._tryToSplitAndRedo(
1218 strResource,
1225 );
1226 }
1228 > const cannotLockDueToResources: string[] = [];
1229 > for (const editStack of editStackSnapshot.editStacks) {
1230 > if (editStack.locked) {
1231 cannotLockDueToResources.push(editStack.resourceLabel);
1232 }
1234 > if (cannotLockDueToResources.length > 0) {
1235 return this._tryToSplitAndRedo(
1236 strResource,
1243 );
1244 }
1246 > // check if new stack elements were added in the meantime...
1247 > if (!editStackSnapshot.isValid()) {
1248 return this._tryToSplitAndRedo(
1249 strResource,
1256 );
1257 }
1259 > return null;
1260 > }
1261
1262 private _workspaceRedo(strResource: string, element: WorkspaceStackElement): Promise<void> | void {
1263 > const affectedEditStacks = this._getAffectedEditStacks(element); undoRedoService.ts
1264 > const verificationError = this._checkWorkspaceRedo(strResource, element, affectedEditStacks, /*invalidated resources will be checked after the prepare call*/false);
1265 > if (verificationError) {
1266 return verificationError.returnValue;
1267 }
1268 > return this._executeWorkspaceRedo(strResource, element, affectedEditStacks); undoRedoService.ts
1269 > }
1270
1271 private async _executeWorkspaceRedo(strResource: string, element: WorkspaceStackElement, editStackSnapshot: EditStackSnapshot): Promise<void> {
1272 > // prepare undoRedoService.ts
1273 > let cleanup: IDisposable;
1274 > try {
1275 > cleanup = await this._invokeWorkspacePrepare(element);
1276 > } catch (err) {
1277 return this._onError(err, element);
1278 }
1280 > // At this point, it is possible that the element has been made invalid in the meantime (due to the prepare await)
1281 > const verificationError = this._checkWorkspaceRedo(strResource, element, editStackSnapshot, /*now also check that there are no more invalidated resources*/true);
1282 > if (verificationError) {
1283 cleanup.dispose();
1284 return verificationError.returnValue;
1285 }
1287 > for (const editStack of editStackSnapshot.editStacks) {
1288 > editStack.moveForward(element);
1289 > }
1290 > return this._safeInvokeWithLocks(element, () => element.actual.redo(), editStackSnapshot, cleanup, () => this._continueRedoInGroup(element.groupId));
1291 > }
1292
1293 private _resourceRedo(editStack: ResourceEditStack, element: ResourceStackElement): Promise<void> | void {
1381 try {
1382 if (element.type === UndoRedoElementType.Workspace) {
1383 > return this._workspaceRedo(strResource, element); undoRedoService.ts
1384 } else {
1385 return this._resourceRedo(editStack, element);