constructor(startOffset: number, endOffset: number, className: string, metadata: number) {
this.endOffset = endOffset;
this.className = className;
this.metadata = metadata;
}
}
Frontier kind: Code frontier
unlabeled · c_7f4882681e39
13 tests · 7422 LOC · 35 files · introduces 0 tests · 86 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/editor/test/common/viewLayout/lineDecorations.test|title=Editor ViewLayout - ViewLineParts ViewLineParts|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/editor/test/common/viewLayout/lineDecorations.test|title=Editor ViewLayout - ViewLineParts issue #3462: no whitespace shown at the end of a decorated line|occurrence=1mocha: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: 86 introduced LOC across 13 ranges. Expand a file to inspect source; the > gutter marks introduced lines.
constructor(startOffset: number, endOffset: number, className: string, metadata: number) {
this.endOffset = endOffset;
this.className = className;
this.metadata = metadata;
}
}
constructor() {
this.classNames = [];
this.metadata = [];
this.count = 0;
}
private static _metadata(metadata: number[]): number {
for (let i = 0, len = metadata.length; i < len; i++) {
result |= metadata[i];
}
return result;
}
public consumeLowerThan(maxStopOffset: number, nextStartOffset: number, result: DecorationSegment[]): number {
while (this.count > 0 && this.stopOffsets[0] < maxStopOffset) {
let i = 0;
// Take all equal stopping offsets
while (i + 1 < this.count && this.stopOffsets[i] === this.stopOffsets[i + 1]) {
i++;
}
// Basically we are consuming the first i + 1 elements of the stack
result.push(new DecorationSegment(nextStartOffset, this.stopOffsets[i], this.classNames.join(' '), Stack._metadata(this.metadata)));
nextStartOffset = this.stopOffsets[i] + 1;
// Consume them
this.stopOffsets.splice(0, i + 1);
this.classNames.splice(0, i + 1);
this.metadata.splice(0, i + 1);
this.count -= (i + 1);
}
if (this.count > 0 && nextStartOffset < maxStopOffset) {
result.push(new DecorationSegment(nextStartOffset, maxStopOffset - 1, this.classNames.join(' '), Stack._metadata(this.metadata)));
nextStartOffset = maxStopOffset;
}
return nextStartOffset;
}
public insert(stopOffset: number, className: string, metadata: number): void {
// Insert at the end
this.stopOffsets.push(stopOffset);
this.classNames.push(className);
this.metadata.push(metadata);
} else {
// Find the insertion position for `stopOffset`
for (let i = 0; i < this.count; i++) {
*/
public static normalize(lineContent: string, lineDecorations: LineDecoration[]): DecorationSegment[] {
return [];
}
const result: DecorationSegment[] = [];
const stack = new Stack();
let nextStartOffset = 0;
for (let i = 0, len = lineDecorations.length; i < len; i++) {
const d = lineDecorations[i];
let startColumn = d.startColumn;
let endColumn = d.endColumn;
const className = d.className;
const metadata = (
d.type === InlineDecorationType.Before
? LinePartMetadata.PSEUDO_BEFORE
: d.type === InlineDecorationType.After
? LinePartMetadata.PSEUDO_AFTER
: 0
// If the position would end up in the middle of a high-low surrogate pair, we move it to before the pair
if (startColumn > 1) {
const charCodeBefore = lineContent.charCodeAt(startColumn - 2);
if (strings.isHighSurrogate(charCodeBefore)) {
}
}
if (endColumn > 1) {
const charCodeBefore = lineContent.charCodeAt(endColumn - 2);
if (strings.isHighSurrogate(charCodeBefore)) {
endColumn--;
}
const currentStartOffset = startColumn - 1;
const currentEndOffset = endColumn - 2;
nextStartOffset = stack.consumeLowerThan(currentStartOffset, nextStartOffset, result);
if (stack.count === 0) {
nextStartOffset = currentStartOffset;
}
stack.insert(currentEndOffset, className, metadata);
}
stack.consumeLowerThan(Constants.MAX_SAFE_SMALL_INTEGER, nextStartOffset, result);
return result;
}
}