public getOutputLineCount(): number {
}
public getMinOutputOffset(outputLineIndex: number): number {
Frontier kind: Joint frontier
unlabeled · c_5b93378dda15
1 test · 35884 LOC · 207 files · introduces 1 test · 69 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.
1 test introduced at this concept.
Every collected source range enters the hierarchy at exactly one concept.
1 file ranked by introduced lines: 69 introduced LOC across 10 ranges. Expand a file to inspect source; the > gutter marks introduced lines.
public getOutputLineCount(): number {
}
public getMinOutputOffset(outputLineIndex: number): number {
public normalizeOutputPosition(outputLineIndex: number, outputOffset: number, affinity: PositionAffinity): OutputPosition {
const offsetInInputWithInjections = this.outputPositionToOffsetInInputWithInjections(outputLineIndex, outputOffset);
const normalizedOffsetInUnwrappedLine = this.normalizeOffsetInInputWithInjectionsAroundInjections(offsetInInputWithInjections, affinity);
if (normalizedOffsetInUnwrappedLine !== offsetInInputWithInjections) {
// injected text caused a change
return this.offsetInInputWithInjectionsToOutputPosition(normalizedOffsetInUnwrappedLine, affinity);
}
}
if (affinity === PositionAffinity.Left) {
if (outputLineIndex > 0 && outputOffset === this.getMinOutputOffset(outputLineIndex)) {
return new OutputPosition(outputLineIndex - 1, this.getMaxOutputOffset(outputLineIndex - 1));
}
}
const maxOutputLineIndex = this.getOutputLineCount() - 1;
if (outputLineIndex < maxOutputLineIndex && outputOffset === this.getMaxOutputOffset(outputLineIndex)) {
return new OutputPosition(outputLineIndex + 1, this.getMinOutputOffset(outputLineIndex + 1));
}
return new OutputPosition(outputLineIndex, outputOffset);
}
private outputPositionToOffsetInInputWithInjections(outputLineIndex: number, outputOffset: number): number {
outputOffset = Math.max(0, outputOffset - this.wrappedTextIndentLength);
}
const result = (outputLineIndex > 0 ? this.breakOffsets[outputLineIndex - 1] : 0) + outputOffset;
return result;
}
private normalizeOffsetInInputWithInjectionsAroundInjections(offsetInInputWithInjections: number, affinity: PositionAffinity): number {
const injectedText = this.getInjectedTextAtOffset(offsetInInputWithInjections);
modelLineProjectionData.ts
if (!injectedText) {
return offsetInInputWithInjections;
}
if (affinity === PositionAffinity.None) {
if (offsetInInputWithInjections === injectedText.offsetInInputWithInjections + injectedText.length
&& hasRightCursorStop(this.injectionOptions![injectedText.injectedTextIndex].cursorStops)) {
return result;
}
} else if (affinity === PositionAffinity.Right || affinity === PositionAffinity.RightOfInjectedText) {
modelLineProjectionData.ts
let result = injectedText.offsetInInputWithInjections + injectedText.length;
let index = injectedText.injectedTextIndex;
// traverse all injected text that touch each other
while (index + 1 < this.injectionOffsets!.length && this.injectionOffsets![index + 1] === this.injectionOffsets![index]) {
result += this.injectionOptions![index + 1].content.length;
index++;
}
} else if (affinity === PositionAffinity.Left || affinity === PositionAffinity.LeftOfInjectedText) {
// affinity is left
let result = injectedText.offsetInInputWithInjections;
assertNever(affinity);
public getInjectedText(outputLineIndex: number, outputOffset: number): InjectedText | null {
private getInjectedTextAtOffset(offsetInInputWithInjections: number): { injectedTextIndex: number; offsetInInputWithInjections: number; length: number } | undefined {
const injectionOptions = this.injectionOptions;
if (injectionOffsets !== null) {
let totalInjectedTextLengthBefore = 0;
for (let i = 0; i < injectionOffsets.length; i++) {
const length = injectionOptions![i].content.length;
const injectedTextStartOffsetInInputWithInjections = injectionOffsets[i] + totalInjectedTextLengthBefore;
const injectedTextEndOffsetInInputWithInjections = injectionOffsets[i] + totalInjectedTextLengthBefore + length;
if (injectedTextStartOffsetInInputWithInjections > offsetInInputWithInjections) {
// Injected text starts later.
break; // All later injected texts have an even larger offset.
}
if (offsetInInputWithInjections <= injectedTextEndOffsetInInputWithInjections) {
// Injected text ends after or with the given position (but also starts with or before it).
return {
injectedTextIndex: i,
offsetInInputWithInjections: injectedTextStartOffsetInInputWithInjections,
length
};
}
totalInjectedTextLengthBefore += length;
}
}
return undefined;
}
}