textModel.ts ×3

Frontier kind: Joint frontier

unlabeled · c_be71bd78d0f6

1 test · 41330 LOC · 239 files · introduces 1 test · 32 LOC · 4 files

Introduces — evidence that enters the hierarchy at this concept

Code
8 ranges32 lines · 4 files
Tests
1 test

Contains — complete concept membership

All code (extent)
5198 ranges41330 lines · 239 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.

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.

4 files ranked by introduced lines: 32 introduced LOC across 8 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/editor/common/model/tokens/tokenizationTextModelPart.ts 19 introduced LOC · 3 ranges

Open complete file

99 this.tokens.recomputeInitiallyAndOnChange(this._store, value => {
100 if (hadTokens) {
101 > // We need to reset the tokenization, as the new token provider otherwise won't have a chance to provide tokens until some action happens in the editor. tokenizationTextModelPart.ts
102 > // TODO@hediet: Look into why this is needed.
103 > value.todo_resetTokenization();
104 > }
105 hadTokens = true;
106 });
367
368 public setLanguageId(languageId: string, source: string = 'api'): void {
369 > if (this._languageId === languageId) { tokenizationTextModelPart.ts
370 // There's nothing to do
371 return;
372 }
374 > const e: IModelLanguageChangedEvent = {
375 > oldLanguage: this._languageId,
376 > newLanguage: languageId,
377 > source
378 > };
379 >
380 > this._languageId = languageId;
381 > this._languageIdObs.set(languageId, undefined);
382 > this._bracketPairsTextModelPart.handleDidChangeLanguage(e);
383 >
384 > this._onDidChangeLanguage.fire(e);
385 > this._onDidChangeLanguageConfiguration.fire({});
386 > }
387
388 // #endregion
src/vs/editor/common/model/textModel.ts 8 introduced LOC · 3 ranges

Open complete file

2088
2089 public setLanguage(languageIdOrSelection: string | ILanguageSelection, source?: string): void {
2090 > if (typeof languageIdOrSelection === 'string') { textModel.ts
2091 > this._languageSelectionListener.clear();
2092 > this._setLanguage(languageIdOrSelection, source);
2093 > } else {
2094 this._languageSelectionListener.value = languageIdOrSelection.onDidChange(() => this._setLanguage(languageIdOrSelection.languageId, source));
2095 this._setLanguage(languageIdOrSelection.languageId, source);
2096 }
2097 > } textModel.ts
2098
2099 private _setLanguage(languageId: string, source?: string): void {
2100 > this.tokenization.setLanguageId(languageId, source); textModel.ts
2101 > this._languageService.requestRichLanguageFeatures(languageId);
2102 > }
2103
2104 public getLanguageIdAtPosition(lineNumber: number, column: number): string {
src/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsImpl.ts 3 introduced LOC · 1 range

Open complete file

54
55 public handleDidChangeLanguage(e: IModelLanguageChangedEvent): void {
56 > this.bracketPairsTree.clear(); bracketPairsImpl.ts
57 > this.updateBracketPairsTree();
58 > }
59
60 public handleDidChangeContent(change: IModelContentChangedEvent) {
src/vs/editor/test/common/core/testLineToken.ts 2 introduced LOC · 1 range

Open complete file

29
30 public getForeground(): ColorId {
31 > return TokenMetadata.getForeground(this._metadata); testLineToken.ts
32 > }
33
34 public getType(): string {