public getClosestPastElement(): StackElement | null {
return null;
}
}
public getSecondClosestPastElement(): StackElement | null {
Frontier kind: Code frontier
unlabeled · c_25cecf819784
4 tests · 7599 LOC · 40 files · introduces 0 tests · 63 LOC · 1 file
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.
Graph controls are ready.
Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.
Every exact file and test below is linked only from the concept that introduces it.
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/charCode.test|title=CharCode has good values|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/path.test|title=Paths (Node Implementation) path|occurrence=1mocha: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=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/uri.test|title=URI URI#file, win-speciale|occurrence=1Every collected test enters the hierarchy at exactly one concept.
No tests are introduced at this concept. Its intent tests are introduced by other concepts.
Every collected source range enters the hierarchy at exactly one concept.
1 file ranked by introduced lines: 63 introduced LOC across 18 ranges. Expand a file to inspect source; the > gutter marks introduced lines.
public getClosestPastElement(): StackElement | null {
return null;
}
}
public getSecondClosestPastElement(): StackElement | null {
public moveBackward(element: StackElement): void {
this._future.push(element);
this.versionId++;
}
public moveForward(element: StackElement): void {
constructor(editStacks: ResourceEditStack[]) {
this._versionIds = [];
for (let i = 0, len = this.editStacks.length; i < len; i++) {
this._versionIds[i] = this.editStacks[i].versionId;
}
}
public isValid(): boolean {
private _acquireLocks(editStackSnapshot: EditStackSnapshot): () => void {
for (const editStack of editStackSnapshot.editStacks) {
if (editStack.locked) {
throw new Error('Cannot acquire edit stack lock');
}
// can acquire all locks
for (const editStack of editStackSnapshot.editStacks) {
editStack.locked = true;
}
return () => {
// release all locks
for (const editStack of editStackSnapshot.editStacks) {
editStack.locked = false;
}
};
}
private _safeInvokeWithLocks(element: StackElement, invoke: () => Promise<void> | void, editStackSnapshot: EditStackSnapshot, cleanup: IDisposable, continuation: () => Promise<void> | void): Promise<void> | void {
let result: Promise<void> | void;
try {
result = invoke();
} catch (err) {
releaseLocks();
cleanup.dispose();
return this._onError(err, element);
}
if (result) {
// result is Promise<void>
return result.then(
}
);
// result is void
releaseLocks();
cleanup.dispose();
return continuation();
}
}
private async _invokeWorkspacePrepare(element: WorkspaceStackElement): Promise<IDisposable> {
private _continueUndoInGroup(groupId: number, undoConfirmed: boolean): Promise<void> | void {
return;
}
const [, matchedStrResource] = this._findClosestUndoElementInGroup(groupId);
return this._undo(matchedStrResource, 0, undoConfirmed);
}
public undo(resourceOrSource: URI | UndoRedoSource): Promise<void> | void {
return;
}
const editStack = this._editStacks.get(strResource)!;
const element = editStack.getClosestPastElement();
if (!element) {
return;
}
if (element.groupId) {
// this element is a part of a group, we need to make sure undoing in a group is in order
const [matchedElement, matchedStrResource] = this._findClosestUndoElementInGroup(element.groupId);
}
}
const shouldPromptForConfirmation = (element.sourceId !== sourceId || element.confirmBeforeUndo);
if (shouldPromptForConfirmation && !undoConfirmed) {
// Hit a different source or the element asks for prompt before undo, prompt for confirmation
return this._confirmAndContinueUndo(strResource, sourceId, element);
}
try {
if (element.type === UndoRedoElementType.Workspace) {
return this._workspaceUndo(strResource, element, undoConfirmed);
return this._resourceUndo(editStack, element, undoConfirmed);
}
} finally {
this._print('undo');
}
}