textResourceConfiguration.ts ×1

Frontier kind: Code frontier

unlabeled · c_8a60c83167ea

922 tests · 11225 LOC · 53 files · introduces 0 tests · 89 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
1 range89 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1681 ranges11225 lines · 53 files · Browse complete extent
All tests (intent)
922 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: 89 introduced LOC across 1 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/editor/common/services/textResourceConfiguration.ts 89 introduced LOC · 1 range

Open complete file

1 > /*--------------------------------------------------------------------------------------------- textResourceConfiguration.ts
2 > * Copyright (c) Microsoft Corporation. All rights reserved.
3 > * Licensed under the MIT License. See License.txt in the project root for license information.
4 > *--------------------------------------------------------------------------------------------*/
5 >
6 > import { Event } from '../../../base/common/event.js';
7 > import { URI } from '../../../base/common/uri.js';
8 > import { IPosition } from '../core/position.js';
9 > import { ConfigurationTarget, IConfigurationValue } from '../../../platform/configuration/common/configuration.js';
10 > import { createDecorator } from '../../../platform/instantiation/common/instantiation.js';
11 >
12 > export const ITextResourceConfigurationService = createDecorator<ITextResourceConfigurationService>('textResourceConfigurationService');
13 >
14 > export interface ITextResourceConfigurationChangeEvent {
15 >
16 > /**
17 > * All affected keys. Also includes language overrides and keys changed under language overrides.
18 > */
19 > readonly affectedKeys: ReadonlySet<string>;
20 >
21 > /**
22 > * Returns `true` if the given section has changed for the given resource.
23 > *
24 > * Example: To check if the configuration section has changed for a given resource use `e.affectsConfiguration(resource, section)`.
25 > *
26 > * @param resource Resource for which the configuration has to be checked.
27 > * @param section Section of the configuration
28 > */
29 > affectsConfiguration(resource: URI | undefined, section: string): boolean;
30 > }
31 >
32 > export interface ITextResourceConfigurationService {
33 >
34 > readonly _serviceBrand: undefined;
35 >
36 > /**
37 > * Event that fires when the configuration changes.
38 > */
39 > readonly onDidChangeConfiguration: Event<ITextResourceConfigurationChangeEvent>;
40 >
41 > /**
42 > * Fetches the value of the section for the given resource by applying language overrides.
43 > * Value can be of native type or an object keyed off the section name.
44 > *
45 > * @param resource - Resource for which the configuration has to be fetched.
46 > * @param position - Position in the resource for which configuration has to be fetched.
47 > * @param section - Section of the configuration.
48 > *
49 > */
50 > getValue<T>(resource: URI | undefined, section?: string): T;
51 > getValue<T>(resource: URI | undefined, position?: IPosition, section?: string): T;
52 >
53 > /**
54 > * Inspects the values of the section for the given resource by applying language overrides.
55 > *
56 > * @param resource - Resource for which the configuration has to be fetched.
57 > * @param position - Position in the resource for which configuration has to be fetched.
58 > * @param section - Section of the configuration.
59 > *
60 > */
61 > inspect<T>(resource: URI | undefined, position: IPosition | null, section: string): IConfigurationValue<Readonly<T>>;
62 >
63 > /**
64 > * Update the configuration value for the given resource at the effective location.
65 > *
66 > * - If configurationTarget is not specified, target will be derived by checking where the configuration is defined.
67 > * - If the language overrides for the give resource contains the configuration, then it is updated.
68 > *
69 > * @param resource Resource for which the configuration has to be updated
70 > * @param key Configuration key
71 > * @param value Configuration value
72 > * @param configurationTarget Optional target into which the configuration has to be updated.
73 > * If not specified, target will be derived by checking where the configuration is defined.
74 > */
75 > updateValue(resource: URI | undefined, key: string, value: unknown, configurationTarget?: ConfigurationTarget): Promise<void>;
76 >
77 > }
78 >
79 > export const ITextResourcePropertiesService = createDecorator<ITextResourcePropertiesService>('textResourcePropertiesService');
80 >
81 > export interface ITextResourcePropertiesService {
82 >
83 > readonly _serviceBrand: undefined;
84 >
85 > /**
86 > * Returns the End of Line characters for the given resource
87 > */
88 > getEOL(resource: URI, language?: string): string;
89 > }