textModel.ts ×10

Frontier kind: Code frontier

unlabeled · c_1dceeea5016e

374 tests · 40497 LOC · 238 files · introduces 0 tests · 31 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
10 ranges31 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
4892 ranges40497 lines · 238 files · Browse complete extent
All tests (intent)
374 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.

1 file ranked by introduced lines: 31 introduced LOC across 10 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/editor/common/model/textModel.ts 31 introduced LOC · 10 ranges

Open complete file

1623
1624 private handleBeforeFireDecorationsChangedEvent(affectedInjectedTextLines: Set<number> | null, affectedLineHeights: Set<LineHeightChangingDecoration> | null, affectedFontLines: Set<LineFontChangingDecoration> | null): void {
1625 > // This is called before the decoration changed event is fired. textModel.ts
1626 >
1627 > if (affectedInjectedTextLines && affectedInjectedTextLines.size > 0) {
1628 const affectedLines = Array.from(affectedInjectedTextLines);
1629 const lineChangeEvents = affectedLines.map(lineNumber => new ModelRawLineChanged(lineNumber, lineNumber));
1630 this._onDidChangeContentOrInjectedText(new ModelInjectedTextChangedEvent(lineChangeEvents));
1631 }
1632 > this._fireOnDidChangeLineHeight(affectedLineHeights); textModel.ts
1633 > this._fireOnDidChangeFont(affectedFontLines);
1634 > }
1635
1636 private _fireOnDidChangeLineHeight(affectedLineHeights: Set<LineHeightChangingDecoration> | null): void {
1637 > if (affectedLineHeights && affectedLineHeights.size > 0) { textModel.ts
1638 const affectedLines = Array.from(affectedLineHeights);
1639 const lineHeightChangeEvent = affectedLines.map(specialLineHeightChange => new ModelLineHeightChanged(specialLineHeightChange.ownerId, specialLineHeightChange.decorationId, specialLineHeightChange.lineNumber, specialLineHeightChange.lineHeight));
1640 this._onDidChangeLineHeight.fire(new ModelLineHeightChangedEvent(lineHeightChangeEvent));
1641 }
1642 > } textModel.ts
1643
1644 private _fireOnDidChangeFont(affectedFontLines: Set<LineFontChangingDecoration> | null): void {
1645 > if (affectedFontLines && affectedFontLines.size > 0) { textModel.ts
1646 const affectedLines = Array.from(affectedFontLines);
1647 const fontChangeEvent = affectedLines.map(fontChange => new ModelFontChanged(fontChange.ownerId, fontChange.lineNumber));
1648 this._onDidChangeFont.fire(new ModelFontChangedEvent(fontChangeEvent));
1649 }
1650 > } textModel.ts
1651
1652 private _onDidChangeContentOrInjectedText(e: InternalModelContentChangeEvent | ModelInjectedTextChangedEvent): void {
2621 if (this._deferredCnt === 0) {
2622 if (this._shouldFireDeferred) {
2623 > this.doFire(); textModel.ts
2624 > }
2625
2626 this._affectedInjectedTextLines?.clear();
2670
2671 private tryFire() {
2672 > if (this._deferredCnt === 0) { textModel.ts
2673 this.doFire();
2674 > } else { textModel.ts
2675 > this._shouldFireDeferred = true;
2676 > }
2677 > }
2678
2679 private doFire() {
2680 > this.handleBeforeFire(this._affectedInjectedTextLines, this._affectedLineHeights, this._affectedFontLines); textModel.ts
2681 >
2682 > const event: IModelDecorationsChangedEvent = {
2683 > affectsMinimap: this._affectsMinimap,
2684 > affectsOverviewRuler: this._affectsOverviewRuler,
2685 > affectsGlyphMargin: this._affectsGlyphMargin,
2686 > affectsLineNumber: this._affectsLineNumber,
2687 > };
2688 > this._shouldFireDeferred = false;
2689 > this._affectsMinimap = false;
2690 > this._affectsOverviewRuler = false;
2691 > this._affectsGlyphMargin = false;
2692 > this._actual.fire(event);
2693 > }
2694 }
2695