sparseMultilineTokens.ts ×4

Frontier kind: Code frontier

unlabeled · c_44e9457e7d68

5 tests · 39210 LOC · 240 files · introduces 0 tests · 18 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
7 ranges18 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
4568 ranges39210 lines · 240 files · Browse complete extent
All tests (intent)
5 testsBrowse 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.

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.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

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

2 files ranked by introduced lines: 18 introduced LOC across 7 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/editor/common/tokens/sparseMultilineTokens.ts 11 introduced LOC · 4 ranges

Open complete file

64
65 public getRange(): Range | null {
66 > const deltaRange = this._tokens.getRange(); sparseMultilineTokens.ts
67 > if (!deltaRange) {
68 return deltaRange;
69 }
70 > return new Range(this._startLineNumber + deltaRange.startLineNumber, deltaRange.startColumn, this._startLineNumber + deltaRange.endLineNumber, deltaRange.endColumn); sparseMultilineTokens.ts
71 > }
72
73 public removeTokens(range: Range): void {
204
205 public getRange(): Range | null {
206 > const tokenCount = this._getTokenCount(); sparseMultilineTokens.ts
207 > if (tokenCount === 0) {
208 return null;
209 }
210 > const startChar = this._getStartCharacter(0); sparseMultilineTokens.ts
211 > const maxDeltaLine = this._getDeltaLine(tokenCount - 1);
212 > const endChar = this._getEndCharacter(tokenCount - 1);
213 > return new Range(0, startChar + 1, maxDeltaLine, endChar + 1);
214 > }
215
216 private _getTokenCount(): number {
src/vs/editor/common/tokens/sparseTokensStore.ts 7 introduced LOC · 3 ranges

Open complete file

52 let range = _range;
53 if (pieces.length > 0) {
54 > const _firstRange = pieces[0].getRange(); sparseTokensStore.ts
55 > const _lastRange = pieces[pieces.length - 1].getRange();
56 > if (!_firstRange || !_lastRange) {
57 return _range;
58 }
59 > range = _range.plusRange(_firstRange).plusRange(_lastRange); sparseTokensStore.ts
60 > }
61
62 let insertPosition: { index: number } | null = null;
118
119 if (pieces.length > 0) {
120 > this._pieces = arrays.arrayInsert(this._pieces, insertPosition.index, pieces); sparseTokensStore.ts
121 > }
122
123 // console.log(`I HAVE ${this._pieces.length} pieces`);