preferences.ts ×2

Frontier kind: Code frontier

unlabeled · c_0089b836c078

11 tests · 10531 LOC · 44 files · introduces 0 tests · 346 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
2 ranges346 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1129 ranges10531 lines · 44 files · Browse complete extent
All tests (intent)
11 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.

Introduced files, introduced tests, and structurally relevant concept specializationexternalUriOpenerService.ts ×2 · 4 introduced LOCexternalUriOpenerService…externalUriOpenerService.ts ×1 · 2 introduced LOCexternalUriOpenerService…externalUriOpenerService.ts ×9 · 38 introduced LOCexternalUriOpenerService…externalUriOpenerService.ts ×2 · 3 introduced LOCexternalUriOpenerService…externalUriOpenerService.ts ×9 · 172 introduced LOCexternalUriOpenerService…preferencesModels.ts ×2 · 4 introduced LOCpreferencesModels.ts ×2preferencesModels.test|title=DefaultSettings separates groups with same id but different titles|occurrence=1, preferencesModels.test|title=DefaultSettings groups settings correctly when extension id is same as group id|occurrence=1 · 0 introduced LOCpreferencesModels.test|t…preferencesModels.ts ×2 · 2 introduced LOCpreferencesModels.ts ×2preferencesModels.test|title=DefaultSettings groups settings by title when they share the same extension id|occurrence=1 · 0 introduced LOCpreferencesModels.test|t…preferencesModels.ts ×2 · 6 introduced LOCpreferencesModels.ts ×2preferencesModels.ts ×1 · 1 introduced LOCpreferencesModels.ts ×1preferencesModels.ts ×2 · 7 introduced LOCpreferencesModels.ts ×2preferencesModels.ts ×1 · 2 introduced LOCpreferencesModels.ts ×1preferencesModels.ts ×3 · 3 introduced LOCpreferencesModels.ts ×3preferencesModels.ts ×2 · 3 introduced LOCpreferencesModels.ts ×2preferencesModels.ts ×1 · 3 introduced LOCpreferencesModels.ts ×1preferencesModels.ts ×90 · 441 introduced LOCpreferencesModels.ts ×90editor.ts ×36 · 1397 introduced LOCeditor.ts ×36ternarySearchTree.ts ×1 · 4 introduced LOCternarySearchTree.ts ×1testConfigurationService.ts ×10 · 40 introduced LOCtestConfigurationService…files.ts ×1 · 4 introduced LOCfiles.ts ×1files.ts ×1 · 4 introduced LOCfiles.ts ×1files.ts ×1 · 4 introduced LOCfiles.ts ×1files.ts ×41 · 1348 introduced LOCfiles.ts ×41ternarySearchTree.ts ×1 · 2 introduced LOCternarySearchTree.ts ×1ternarySearchTree.ts ×1 · 3 introduced LOCternarySearchTree.ts ×1ternarySearchTree.ts ×60 · 193 introduced LOCternarySearchTree.ts ×60actions.ts ×25 · 151 introduced LOCactions.ts ×25instantiation.ts ×1 · 2 introduced LOCinstantiation.ts ×1severity.ts ×3 · 32 introduced LOCseverity.ts ×3network.ts ×20 · 292 introduced LOCnetwork.ts ×20strings.ts ×101 · 542 introduced LOCstrings.ts ×101configurationRegistry.ts ×40 · 487 introduced LOCconfigurationRegistry.ts…jsonContributionRegistry.ts ×9 · 100 introduced LOCjsonContributionRegistry…cancellation.ts ×18 · 90 introduced LOCcancellation.ts ×18lifecycle.ts ×2 · 3 introduced LOClifecycle.ts ×2lifecycle.test|title=Lifecycle dispose disposable array|occurrence=1, lifecycle.test|title=Lifecycle Action bar has broken accessibility #100273|occurrence=1 · 0 introduced LOClifecycle.test|title=Lif…event.ts ×1 · 1 introduced LOCevent.ts ×1event.ts ×4 · 9 introduced LOCevent.ts ×4event.ts ×2 · 4 introduced LOCevent.ts ×2event.ts ×2 · 6 introduced LOCevent.ts ×2event.ts ×93 · 864 introduced LOCevent.ts ×93range.ts ×40 · 247 introduced LOCrange.ts ×40lifecycle.ts ×1 · 6 introduced LOClifecycle.ts ×1position.ts ×16 · 113 introduced LOCposition.ts ×16configuration.ts ×12 · 203 introduced LOCconfiguration.ts ×12platform.ts ×1 · 2 introduced LOCplatform.ts ×1platform.ts ×1 · 6 introduced LOCplatform.ts ×1product.ts ×4 · 39 introduced LOCproduct.ts ×4utils.ts ×3 · 9 introduced LOCutils.ts ×3nls.ts ×1 · 1 introduced LOCnls.ts ×1instantiation.ts ×4 · 10 introduced LOCinstantiation.ts ×4nls.ts ×3 · 9 introduced LOCnls.ts ×3nls.ts ×1 · 1 introduced LOCnls.ts ×1errorMessage.ts ×6 · 29 introduced LOCerrorMessage.ts ×6lifecycle.ts ×1 · 3 introduced LOClifecycle.ts ×1linkedList.ts ×13 · 44 introduced LOClinkedList.ts ×13nls.ts ×6 · 13 introduced LOCnls.ts ×6instantiation.ts ×5 · 111 introduced LOCinstantiation.ts ×5platform.ts ×5 · 46 introduced LOCplatform.ts ×5types.ts ×1 · 2 introduced LOCtypes.ts ×1jsonSchema.ts ×3 · 194 introduced LOCjsonSchema.ts ×3lifecycle.ts ×1 · 4 introduced LOClifecycle.ts ×1lifecycle.ts ×2 · 6 introduced LOClifecycle.ts ×2lifecycle.ts ×2 · 4 introduced LOClifecycle.ts ×2types.ts ×1 · 2 introduced LOCtypes.ts ×1assert.ts ×2 · 2 introduced LOCassert.ts ×2lifecycle.ts ×1 · 6 introduced LOClifecycle.ts ×1lifecycle.ts ×1 · 1 introduced LOClifecycle.ts ×1lifecycle.ts ×1 · 3 introduced LOClifecycle.ts ×1lifecycle.ts ×3 · 9 introduced LOClifecycle.ts ×3types.ts ×2 · 5 introduced LOCtypes.ts ×2lifecycle.ts ×1 · 7 introduced LOClifecycle.ts ×1lifecycle.ts ×4 · 7 introduced LOClifecycle.ts ×4types.ts ×1 · 2 introduced LOCtypes.ts ×1lifecycle.ts ×4 · 8 introduced LOClifecycle.ts ×4lifecycle.ts ×6 · 16 introduced LOClifecycle.ts ×6lifecycle.ts ×2 · 2 introduced LOClifecycle.ts ×2lazy.ts ×1 · 2 introduced LOClazy.ts ×1lifecycle.ts ×1 · 3 introduced LOClifecycle.ts ×1lifecycle.ts ×3 · 3 introduced LOClifecycle.ts ×3lazy.ts ×3 · 37 introduced LOClazy.ts ×3lifecycle.ts ×1 · 2 introduced LOClifecycle.ts ×1lifecycle.ts ×1 · 2 introduced LOClifecycle.ts ×1uint.ts ×2 · 43 introduced LOCuint.ts ×2iterator.ts ×1 · 2 introduced LOCiterator.ts ×1lifecycle.ts ×1 · 3 introduced LOClifecycle.ts ×1map.ts ×97 · 3334 introduced LOCmap.ts ×97src/vs/base/common/actions.ts · 294 LOCcommon/actions.tssrc/vs/base/common/arrays.ts · 949 LOCcommon/arrays.tssrc/vs/base/common/arraysFind.ts · 226 LOCcommon/arraysFind.tssrc/vs/base/common/assert.ts · 91 LOCcommon/assert.tssrc/vs/base/common/cache.ts · 153 LOCcommon/cache.tssrc/vs/base/common/cancellation.ts · 206 LOCcommon/cancellation.tssrc/vs/base/common/charCode.ts · 450 LOCcommon/charCode.tssrc/vs/base/common/collections.ts · 176 LOCcommon/collections.tssrc/vs/base/common/errorMessage.ts · 113 LOCcommon/errorMessage.tssrc/vs/base/common/errors.ts · 357 LOCcommon/errors.tssrc/vs/base/common/event.ts · 1964 LOCcommon/event.tssrc/vs/base/common/functional.ts · 32 LOCcommon/functional.tssrc/vs/base/common/iterator.ts · 194 LOCcommon/iterator.tssrc/vs/base/common/jsonSchema.ts · 330 LOCcommon/jsonSchema.tssrc/vs/base/common/lazy.ts · 57 LOCcommon/lazy.tssrc/vs/base/common/lifecycle.ts · 974 LOCcommon/lifecycle.tssrc/vs/base/common/linkedList.ts · 151 LOCcommon/linkedList.tssrc/vs/base/common/map.ts · 1016 LOCcommon/map.tssrc/vs/base/common/marshallingIds.ts · 33 LOCcommon/marshallingIds.tssrc/vs/base/common/network.ts · 440 LOCcommon/network.tssrc/vs/base/common/path.ts · 1589 LOCcommon/path.tssrc/vs/base/common/platform.ts · 281 LOCcommon/platform.tssrc/vs/base/common/process.ts · 76 LOCcommon/process.tssrc/vs/base/common/severity.ts · 56 LOCcommon/severity.tssrc/vs/base/common/stopwatch.ts · 41 LOCcommon/stopwatch.tssrc/vs/base/common/strings.ts · 1413 LOCcommon/strings.tssrc/vs/base/common/ternarySearchTree.ts · 796 LOCcommon/ternarySearchTree…src/vs/base/common/types.ts · 410 LOCcommon/types.tssrc/vs/base/common/uint.ts · 59 LOCcommon/uint.tssrc/vs/base/common/uri.ts · 754 LOCcommon/uri.tssrc/vs/base/test/common/utils.ts · 107 LOCcommon/utils.tssrc/vs/editor/common/core/position.ts · 184 LOCcore/position.tssrc/vs/editor/common/core/range.ts · 520 LOCcore/range.tssrc/vs/nls.ts · 244 LOCvs/nls.tssrc/vs/platform/configuration/common/configuration.ts · 358 LOCcommon/configuration.tssrc/vs/platform/configuration/common/configurationRegistry.ts · 1089 LOCcommon/configurationRegi…src/vs/platform/configuration/test/common/testConfigurationService.ts · 91 LOCcommon/testConfiguration…src/vs/platform/files/common/files.ts · 1658 LOCcommon/files.tssrc/vs/platform/instantiation/common/instantiation.ts · 130 LOCcommon/instantiation.tssrc/vs/platform/jsonschemas/common/jsonContributionRegistry.ts · 143 LOCcommon/jsonContributionR…src/vs/platform/product/common/product.ts · 93 LOCcommon/product.tssrc/vs/platform/registry/common/platform.ts · 63 LOCcommon/platform.tssrc/vs/workbench/common/editor.ts · 1765 LOCcommon/editor.tssrc/vs/workbench/common/editor/editorModel.ts · 50 LOCeditor/editorModel.tssrc/vs/workbench/contrib/externalUriOpener/common/configuration.ts · 73 LOCcommon/configuration.tssrc/vs/workbench/contrib/externalUriOpener/common/externalUriOpenerService.ts · 239 LOCcommon/externalUriOpener…src/vs/workbench/services/preferences/common/preferences.ts · 355 LOCcommon/preferences.tssrc/vs/workbench/services/preferences/common/preferencesModels.ts · 1219 LOCcommon/preferencesModels…lifecycle.test|title=Lifecycle Action bar has broken accessibility #100273|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/lifecycle.test|title=Lifecycle Action bar has broken accessibility #100273|occurrence=1lifecycle.test|title=Lif…lifecycle.test|title=Lifecycle dispose disposable array|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/lifecycle.test|title=Lifecycle dispose disposable array|occurrence=1lifecycle.test|title=Lif…externalUriOpenerService.test|title=ExternalUriOpenerService Should automatically pick single preferred opener without prompt|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/contrib/externalUriOpener/test/common/externalUriOpenerService.test|title=ExternalUriOpenerService Should automatically pick single preferred opener without prompt|occurrence=1externalUriOpenerService…externalUriOpenerService.test|title=ExternalUriOpenerService Should not open if there are no openers|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/contrib/externalUriOpener/test/common/externalUriOpenerService.test|title=ExternalUriOpenerService Should not open if there are no openers|occurrence=1externalUriOpenerService…externalUriOpenerService.test|title=ExternalUriOpenerService Should prompt if there is at least one enabled opener|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/contrib/externalUriOpener/test/common/externalUriOpenerService.test|title=ExternalUriOpenerService Should prompt if there is at least one enabled opener|occurrence=1externalUriOpenerService…preferencesModels.test|title=DefaultSettings groups settings by id when they share the same extension id and have no title|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/preferences/test/common/preferencesModels.test|title=DefaultSettings groups settings by id when they share the same extension id and have no title|occurrence=1preferencesModels.test|t…preferencesModels.test|title=DefaultSettings groups settings by title when they share the same extension id|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/preferences/test/common/preferencesModels.test|title=DefaultSettings groups settings by title when they share the same extension id|occurrence=1preferencesModels.test|t…preferencesModels.test|title=DefaultSettings groups settings correctly when extension id is same as group id|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/preferences/test/common/preferencesModels.test|title=DefaultSettings groups settings correctly when extension id is same as group id|occurrence=1preferencesModels.test|t…preferencesModels.test|title=DefaultSettings merges untitled group into titled group if id matches|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/preferences/test/common/preferencesModels.test|title=DefaultSettings merges untitled group into titled group if id matches|occurrence=1preferencesModels.test|t…preferencesModels.test|title=DefaultSettings separates groups with same id (no title) but different extension ids|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/preferences/test/common/preferencesModels.test|title=DefaultSettings separates groups with same id (no title) but different extension ids|occurrence=1preferencesModels.test|t…preferencesModels.test|title=DefaultSettings separates groups with same id and title but different extension ids|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/preferences/test/common/preferencesModels.test|title=DefaultSettings separates groups with same id and title but different extension ids|occurrence=1preferencesModels.test|t…preferencesModels.test|title=DefaultSettings separates groups with same id but different titles|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/preferences/test/common/preferencesModels.test|title=DefaultSettings separates groups with same id but different titles|occurrence=1preferencesModels.test|t…preferencesModels.test|title=DefaultSettings sorts groups by order|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/preferences/test/common/preferencesModels.test|title=DefaultSettings sorts groups by order|occurrence=1preferencesModels.test|t…Focused concept · preferences.ts ×2 · 346 introduced LOCpreferences.ts ×2

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: 346 introduced LOC across 2 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/workbench/services/preferences/common/preferences.ts 346 introduced LOC · 2 ranges

Open complete file

1 > /*--------------------------------------------------------------------------------------------- preferences.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 { IStringDictionary } from '../../../../base/common/collections.js';
7 > import { Event } from '../../../../base/common/event.js';
8 > import { IMatch } from '../../../../base/common/filters.js';
9 > import { IJSONSchema, IJSONSchemaMap } from '../../../../base/common/jsonSchema.js';
10 > import { ResolvedKeybinding } from '../../../../base/common/keybindings.js';
11 > import { URI } from '../../../../base/common/uri.js';
12 > import { IRange } from '../../../../editor/common/core/range.js';
13 > import { IEditorContribution } from '../../../../editor/common/editorCommon.js';
14 > import { ConfigurationTarget } from '../../../../platform/configuration/common/configuration.js';
15 > import { ConfigurationDefaultValueSource, ConfigurationScope, EditPresentationTypes, IExtensionInfo } from '../../../../platform/configuration/common/configurationRegistry.js';
16 > import { IEditorOptions } from '../../../../platform/editor/common/editor.js';
17 > import { IExtensionDescription } from '../../../../platform/extensions/common/extensions.js';
18 > import { createDecorator } from '../../../../platform/instantiation/common/instantiation.js';
19 > import { ResolvedKeybindingItem } from '../../../../platform/keybinding/common/resolvedKeybindingItem.js';
20 > import { DEFAULT_EDITOR_ASSOCIATION, IEditorPane } from '../../../common/editor.js';
21 > import { EditorInput } from '../../../common/editor/editorInput.js';
22 > import { Settings2EditorModel } from './preferencesModels.js';
23 >
24 > export enum SettingValueType {
25 > Null = 'null',
26 > Enum = 'enum',
27 > String = 'string',
28 > MultilineString = 'multiline-string',
29 > Integer = 'integer',
30 > Number = 'number',
31 > Boolean = 'boolean',
32 > Array = 'array',
33 > Exclude = 'exclude',
34 > Include = 'include',
35 > Complex = 'complex',
36 > NullableInteger = 'nullable-integer',
37 > NullableNumber = 'nullable-number',
38 > Object = 'object',
39 > BooleanObject = 'boolean-object',
40 > LanguageTag = 'language-tag',
41 > ExtensionToggle = 'extension-toggle',
42 > ComplexObject = 'complex-object',
43 > }
44 >
45 > export interface ISettingsGroup {
46 > id: string;
47 > range: IRange;
48 > title: string;
49 > titleRange: IRange;
50 > sections: ISettingsSection[];
51 > order?: number;
52 > extensionInfo?: IExtensionInfo;
53 > }
54 >
55 > export interface ISettingsSection {
56 > title?: string;
57 > settings: ISetting[];
58 > }
59 >
60 > export interface ISetting {
61 > range: IRange;
62 > key: string;
63 > keyRange: IRange;
64 > value: any;
65 > valueRange: IRange;
66 > description: string[];
67 > keywords?: string[];
68 > descriptionIsMarkdown?: boolean;
69 > descriptionRanges: IRange[];
70 > overrides?: ISetting[];
71 > overrideOf?: ISetting;
72 > deprecationMessage?: string;
73 > deprecationMessageIsMarkdown?: boolean;
74 >
75 > scope?: ConfigurationScope;
76 > type?: string | string[];
77 > order?: number;
78 > arrayItemType?: string;
79 > objectProperties?: IJSONSchemaMap;
80 > objectPatternProperties?: IJSONSchemaMap;
81 > objectAdditionalProperties?: boolean | IJSONSchema;
82 > propertyNames?: IJSONSchema;
83 > enum?: string[];
84 > enumDescriptions?: string[];
85 > enumDescriptionsAreMarkdown?: boolean;
86 > uniqueItems?: boolean;
87 > tags?: string[];
88 > disallowSyncIgnore?: boolean;
89 > restricted?: boolean;
90 > extensionInfo?: IExtensionInfo;
91 > validator?: (value: any) => string | null;
92 > enumItemLabels?: string[];
93 > editPresentation?: EditPresentationTypes;
94 > nonLanguageSpecificDefaultValueSource?: ConfigurationDefaultValueSource;
95 > isLanguageTagSetting?: boolean;
96 > categoryLabel?: string;
97 >
98 > // Internal properties
99 > allKeysAreBoolean?: boolean;
100 > displayExtensionId?: string;
101 > title?: string;
102 > extensionGroupTitle?: string;
103 > internalOrder?: number;
104 > }
105 >
106 > export interface IExtensionSetting extends ISetting {
107 > extensionName?: string;
108 > extensionPublisher?: string;
109 > }
110 >
111 > export interface ISearchResult {
112 > filterMatches: ISettingMatch[];
113 > exactMatch: boolean;
114 > metadata?: IFilterMetadata;
115 > }
116 >
117 > export interface ISearchResultGroup {
118 > id: string;
119 > label: string;
120 > result: ISearchResult;
121 > order: number;
122 > }
123 >
124 > export interface IFilterResult {
125 > query?: string;
126 > filteredGroups: ISettingsGroup[];
127 > allGroups: ISettingsGroup[];
128 > matches: IRange[];
129 > metadata?: IStringDictionary<IFilterMetadata>;
130 > exactMatch?: boolean;
131 > }
132 >
133 > /**
134 > * The ways a setting could match a query,
135 > * sorted in increasing order of relevance.
136 > */
137 > export enum SettingMatchType {
138 > None = 0,
139 > LanguageTagSettingMatch = 1 << 0,
140 > RemoteMatch = 1 << 1,
141 > NonContiguousQueryInSettingId = 1 << 2,
142 > DescriptionOrValueMatch = 1 << 3,
143 > NonContiguousWordsInSettingsLabel = 1 << 4,
144 > ContiguousWordsInSettingsLabel = 1 << 5,
145 > ContiguousQueryInSettingId = 1 << 6,
146 > AllWordsInSettingsLabel = 1 << 7,
147 > ExactMatch = 1 << 8,
148 > }
149 > export const SettingKeyMatchTypes = (SettingMatchType.AllWordsInSettingsLabel
150 > | SettingMatchType.ContiguousWordsInSettingsLabel
151 > | SettingMatchType.NonContiguousWordsInSettingsLabel
152 > | SettingMatchType.NonContiguousQueryInSettingId
153 > | SettingMatchType.ContiguousQueryInSettingId);
154 >
155 > export interface ISettingMatch {
156 > setting: ISetting;
157 > matches: IRange[] | null;
158 > matchType: SettingMatchType;
159 > keyMatchScore: number;
160 > score: number;
161 > providerName?: string;
162 > }
163 >
164 > export interface IScoredResults {
165 > [key: string]: IRemoteSetting;
166 > }
167 >
168 > export interface IRemoteSetting {
169 > score: number;
170 > key: string;
171 > id: string;
172 > defaultValue: string;
173 > description: string;
174 > packageId: string;
175 > extensionName?: string;
176 > extensionPublisher?: string;
177 > }
178 >
179 > export interface IFilterMetadata {
180 > requestUrl: string;
181 > requestBody: string;
182 > timestamp: number;
183 > duration: number;
184 > scoredResults: IScoredResults;
185 >
186 > /** The number of requests made, since requests are split by number of filters */
187 > requestCount?: number;
188 >
189 > /** The name of the server that actually served the request */
190 > context: string;
191 > }
192 >
193 > export interface IPreferencesEditorModel<T> {
194 > uri?: URI;
195 > getPreference(key: string): T | undefined;
196 > dispose(): void;
197 > }
198 >
199 > export type IGroupFilter = (group: ISettingsGroup) => boolean | null;
200 > export type ISettingMatcher = (setting: ISetting, group: ISettingsGroup) => { matches: IRange[]; matchType: SettingMatchType; keyMatchScore: number; score: number } | null;
201 >
202 > export interface ISettingsEditorModel extends IPreferencesEditorModel<ISetting> {
203 > readonly onDidChangeGroups: Event<void>;
204 > settingsGroups: ISettingsGroup[];
205 > filterSettings(filter: string, groupFilter: IGroupFilter, settingMatcher: ISettingMatcher): ISettingMatch[];
206 > updateResultGroup(id: string, resultGroup: ISearchResultGroup | undefined): IFilterResult | undefined;
207 > }
208 >
209 > export interface ISettingsEditorOptions extends IEditorOptions {
210 > target?: ConfigurationTarget;
211 > folderUri?: URI;
212 > query?: string;
213 > /**
214 > * Only works when opening the json settings file. Use `query` for settings editor.
215 > */
216 > revealSetting?: {
217 > key: string;
218 > edit?: boolean;
219 > };
220 > focusSearch?: boolean;
221 > }
222 >
223 > export interface IOpenSettingsOptions extends ISettingsEditorOptions {
224 > jsonEditor?: boolean;
225 > openToSide?: boolean;
226 > groupId?: number;
227 > }
228 >
229 > export function validateSettingsEditorOptions(options: ISettingsEditorOptions): ISettingsEditorOptions {
230 return {
231 // Inherit provided options
237 };
238 }
240 > export interface IKeybindingsEditorModel<T> extends IPreferencesEditorModel<T> {
241 > }
242 >
243 > export interface IKeybindingsEditorOptions extends IEditorOptions {
244 > query?: string;
245 > }
246 >
247 > export interface IOpenKeybindingsEditorOptions extends IKeybindingsEditorOptions {
248 > groupId?: number;
249 > }
250 >
251 > export const IPreferencesService = createDecorator<IPreferencesService>('preferencesService');
252 >
253 > export interface IPreferencesService {
254 > readonly _serviceBrand: undefined;
255 >
256 > readonly onDidDefaultSettingsContentChanged: Event<URI>;
257 >
258 > userSettingsResource: URI;
259 > workspaceSettingsResource: URI | null;
260 > getFolderSettingsResource(resource: URI): URI | null;
261 >
262 > createPreferencesEditorModel(uri: URI): Promise<IPreferencesEditorModel<ISetting> | null>;
263 > getDefaultSettingsContent(uri: URI): string | undefined;
264 > hasDefaultSettingsContent(uri: URI): boolean;
265 > createSettings2EditorModel(): Settings2EditorModel; // TODO
266 >
267 > openPreferences(): Promise<void>;
268 >
269 > openRawDefaultSettings(): Promise<IEditorPane | undefined>;
270 > openSettings(options?: IOpenSettingsOptions): Promise<IEditorPane | undefined>;
271 > openApplicationSettings(options?: IOpenSettingsOptions): Promise<IEditorPane | undefined>;
272 > openUserSettings(options?: IOpenSettingsOptions): Promise<IEditorPane | undefined>;
273 > openRemoteSettings(options?: IOpenSettingsOptions): Promise<IEditorPane | undefined>;
274 > openWorkspaceSettings(options?: IOpenSettingsOptions): Promise<IEditorPane | undefined>;
275 > openFolderSettings(options: IOpenSettingsOptions & { folderUri: IOpenSettingsOptions['folderUri'] }): Promise<IEditorPane | undefined>;
276 > openGlobalKeybindingSettings(textual: boolean, options?: IOpenKeybindingsEditorOptions): Promise<void>;
277 > openDefaultKeybindingsFile(): Promise<IEditorPane | undefined>;
278 > openLanguageSpecificSettings(languageId: string, options?: IOpenSettingsOptions): Promise<IEditorPane | undefined>;
279 > getEditableSettingsURI(configurationTarget: ConfigurationTarget, resource?: URI): Promise<URI | null>;
280 > getSetting(settingId: string): ISetting | undefined;
281 >
282 > createSplitJsonEditorInput(configurationTarget: ConfigurationTarget, resource: URI): EditorInput;
283 > }
284 >
285 > export interface KeybindingMatch {
286 > ctrlKey?: boolean;
287 > shiftKey?: boolean;
288 > altKey?: boolean;
289 > metaKey?: boolean;
290 > keyCode?: boolean;
291 > }
292 >
293 > export interface KeybindingMatches {
294 > firstPart: KeybindingMatch;
295 > chordPart: KeybindingMatch;
296 > }
297 >
298 > export interface IKeybindingItemEntry {
299 > id: string;
300 > templateId: string;
301 > keybindingItem: IKeybindingItem;
302 > commandIdMatches?: IMatch[];
303 > commandLabelMatches?: IMatch[];
304 > commandDefaultLabelMatches?: IMatch[];
305 > sourceMatches?: IMatch[];
306 > extensionIdMatches?: IMatch[];
307 > extensionLabelMatches?: IMatch[];
308 > whenMatches?: IMatch[];
309 > keybindingMatches?: KeybindingMatches;
310 > }
311 >
312 > export interface IKeybindingItem {
313 > keybinding: ResolvedKeybinding;
314 > keybindingItem: ResolvedKeybindingItem;
315 > commandLabel: string;
316 > commandDefaultLabel: string;
317 > command: string;
318 > source: string | IExtensionDescription;
319 > when: string;
320 > }
321 >
322 > export interface IKeybindingsEditorPane extends IEditorPane {
323 >
324 > readonly activeKeybindingEntry: IKeybindingItemEntry | null;
325 > readonly onDefineWhenExpression: Event<IKeybindingItemEntry>;
326 > readonly onLayout: Event<void>;
327 >
328 > search(filter: string): void;
329 > focusSearch(): void;
330 > clearSearchResults(): void;
331 > focusKeybindings(): void;
332 > recordSearchKeys(): void;
333 > toggleSortByPrecedence(): void;
334 > selectKeybinding(keybindingEntry: IKeybindingItemEntry): void;
335 > defineKeybinding(keybindingEntry: IKeybindingItemEntry, add: boolean): Promise<void>;
336 > defineWhenExpression(keybindingEntry: IKeybindingItemEntry): void;
337 > updateKeybinding(keybindingEntry: IKeybindingItemEntry, key: string, when: string | undefined): Promise<any>;
338 > removeKeybinding(keybindingEntry: IKeybindingItemEntry): Promise<any>;
339 > resetKeybinding(keybindingEntry: IKeybindingItemEntry): Promise<any>;
340 > copyKeybinding(keybindingEntry: IKeybindingItemEntry): Promise<void>;
341 > copyKeybindingCommand(keybindingEntry: IKeybindingItemEntry): Promise<void>;
342 > showSimilarKeybindings(keybindingEntry: IKeybindingItemEntry): void;
343 > }
344 >
345 > export const DEFINE_KEYBINDING_EDITOR_CONTRIB_ID = 'editor.contrib.defineKeybinding';
346 > export interface IDefineKeybindingEditorContribution extends IEditorContribution {
347 > showDefineKeybindingWidget(): void;
348 > }
349 >
350 > export const FOLDER_SETTINGS_PATH = '.vscode/settings.json';
351 > export const DEFAULT_SETTINGS_EDITOR_SETTING = 'workbench.settings.openDefaultSettings';
352 > export const USE_SPLIT_JSON_SETTING = 'workbench.settings.useSplitJSON';
353 > export const ALWAYS_SHOW_ADVANCED_SETTINGS_SETTING = 'workbench.settings.alwaysShowAdvancedSettings';
354 >
355 > export const SETTINGS_AUTHORITY = 'settings';