src/vs/workbench/services/themes/common/themeCompatibility.ts

76 LOC · 49 covered · 27 uncovered · 2 ranges · 20 concepts · 1 introducers · 7 tests

File neighbourhood

The centred file is linked to every concept that introduces one of its ranges, every test that runs code from the file, and the gray connector concepts standing between those tests and the file's own introducer concepts. Undirected links join concepts to every file where they introduce source and concepts to the tests they introduce; arrows show specialization between the displayed concepts and bridge only concepts omitted from this view. Concept colors match the source ranges below; connector concepts have no source color and are shown in gray.

Focused file, its introducer and connector concepts, their introduced files, and tests that run code from the file

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 related-file, concept, and source links on this page.

Focused file, its introducer and connector concepts, their introduced files, and tests that run code from the filesrc/vs/platform/extensionManagement/common/extensionGalleryManifestService.ts · 228 LOCcommon/extensionGalleryM…src/vs/platform/extensionResourceLoader/common/extensionResourceLoader.ts · 171 LOCcommon/extensionResource…src/vs/platform/extensionResourceLoader/common/extensionResourceLoaderService.ts · 46 LOCcommon/extensionResource…src/vs/platform/theme/common/tokenClassificationRegistry.ts · 632 LOCcommon/tokenClassificati…src/vs/workbench/services/themes/common/colorThemeData.ts · 1083 LOCcommon/colorThemeData.tssrc/vs/workbench/services/themes/common/plistParser.ts · 492 LOCcommon/plistParser.tssrc/vs/workbench/services/themes/common/textMateScopeMatcher.ts · 134 LOCcommon/textMateScopeMatc…colorThemeData.ts ×16 · 64 introduced LOCcolorThemeData.ts ×16tokenClassificationRegistry.ts ×1 · 3 introduced LOCtokenClassificationRegis…tokenClassificationRegistry.ts ×2 · 7 introduced LOCtokenClassificationRegis…tokenStyleResolving.test|title=Themes - TokenStyleResolving language|occurrence=1 · 0 introduced LOCtokenStyleResolving.test…colorThemeData.ts ×1 · 2 introduced LOCcolorThemeData.ts ×1colorThemeData.ts ×12 · 57 introduced LOCcolorThemeData.ts ×12tokenClassificationRegistry.ts ×2 · 6 introduced LOCtokenClassificationRegis…colorThemeData.ts ×5 · 21 introduced LOCcolorThemeData.ts ×5colorThemeData.ts ×1 · 6 introduced LOCcolorThemeData.ts ×1colorThemeData.ts ×33 · 242 introduced LOCcolorThemeData.ts ×33colorThemeData.ts ×2 · 5 introduced LOCcolorThemeData.ts ×2tokenStyleResolving.test|title=Themes - TokenStyleResolving resolveScopes - match most specific|occurrence=1 · 0 introduced LOCtokenStyleResolving.test…colorThemeData.ts ×5 · 33 introduced LOCcolorThemeData.ts ×5colorThemeData.ts ×1 · 4 introduced LOCcolorThemeData.ts ×1tokenClassificationRegistry.ts ×1 · 16 introduced LOCtokenClassificationRegis…colorThemeData.ts ×1 · 1 introduced LOCcolorThemeData.ts ×1colorThemeData.ts ×13 · 114 introduced LOCcolorThemeData.ts ×13colorThemeData.ts ×1 · 1 introduced LOCcolorThemeData.ts ×1colorThemeData.ts ×4 · 15 introduced LOCcolorThemeData.ts ×4colorThemeData.ts ×57 · 483 introduced LOCcolorThemeData.ts ×57tokenStyleResolving.test|title=Themes - TokenStyleResolving color defaults|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/themes/test/node/tokenStyleResolving.test|title=Themes - TokenStyleResolving color defaults|occurrence=1tokenStyleResolving.test…tokenStyleResolving.test|title=Themes - TokenStyleResolving language - scope resolving|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/themes/test/node/tokenStyleResolving.test|title=Themes - TokenStyleResolving language - scope resolving|occurrence=1tokenStyleResolving.test…tokenStyleResolving.test|title=Themes - TokenStyleResolving language|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/themes/test/node/tokenStyleResolving.test|title=Themes - TokenStyleResolving language|occurrence=1tokenStyleResolving.test…tokenStyleResolving.test|title=Themes - TokenStyleResolving resolveScopes - match most specific|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/themes/test/node/tokenStyleResolving.test|title=Themes - TokenStyleResolving resolveScopes - match most specific|occurrence=1tokenStyleResolving.test…tokenStyleResolving.test|title=Themes - TokenStyleResolving resolveScopes|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/themes/test/node/tokenStyleResolving.test|title=Themes - TokenStyleResolving resolveScopes|occurrence=1tokenStyleResolving.test…tokenStyleResolving.test|title=Themes - TokenStyleResolving rule matching|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/themes/test/node/tokenStyleResolving.test|title=Themes - TokenStyleResolving rule matching|occurrence=1tokenStyleResolving.test…tokenStyleResolving.test|title=Themes - TokenStyleResolving super type|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/themes/test/node/tokenStyleResolving.test|title=Themes - TokenStyleResolving super type|occurrence=1tokenStyleResolving.test…Focused file · src/vs/workbench/services/themes/common/themeCompatibility.ts · 76 LOCcommon/themeCompatibilit…

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the related-file, concept, and source links on this page while the interactive map is unavailable.

1 > /*--------------------------------------------------------------------------------------------- colorThemeData.ts ×57
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 { ITextMateThemingRule, IColorMap } from './workbenchThemeService.js';
7 > import { Color } from '../../../../base/common/color.js';
8 > import * as colorRegistry from '../../../../platform/theme/common/colorRegistry.js';
9 >
10 > import * as editorColorRegistry from '../../../../editor/common/core/editorColorRegistry.js';
11 >
12 > const settingToColorIdMapping: { [settingId: string]: string[] } = {};
13 > function addSettingMapping(settingId: string, colorId: string) {
14 > let colorIds = settingToColorIdMapping[settingId];
15 > if (!colorIds) {
16 > settingToColorIdMapping[settingId] = colorIds = [];
17 > }
18 > colorIds.push(colorId);
19 > }
20 >
21 > export function convertSettings(oldSettings: ITextMateThemingRule[], result: { textMateRules: ITextMateThemingRule[]; colors: IColorMap }): void {
22 for (const rule of oldSettings) {
23 result.textMateRules.push(rule);
24 if (!rule.scope) {
25 const settings = rule.settings;
26 if (!settings) {
27 rule.settings = {};
28 } else {
29 for (const settingKey in settings) {
30 const key = <keyof typeof settings>settingKey;
31 const mappings = settingToColorIdMapping[key];
32 if (mappings) {
33 const colorHex = settings[key];
34 if (typeof colorHex === 'string') {
35 const color = Color.fromHex(colorHex);
36 for (const colorId of mappings) {
37 result.colors[colorId] = color;
38 }
39 }
40 }
41 if (key !== 'foreground' && key !== 'background' && key !== 'fontStyle') {
42 delete settings[key];
43 }
44 }
45 }
46 }
47 }
48 }
50 > addSettingMapping('background', colorRegistry.editorBackground);
51 > addSettingMapping('foreground', colorRegistry.editorForeground);
52 > addSettingMapping('selection', colorRegistry.editorSelectionBackground);
53 > addSettingMapping('inactiveSelection', colorRegistry.editorInactiveSelection);
54 > addSettingMapping('selectionHighlightColor', colorRegistry.editorSelectionHighlight);
55 > addSettingMapping('findMatchHighlight', colorRegistry.editorFindMatchHighlight);
56 > addSettingMapping('currentFindMatchHighlight', colorRegistry.editorFindMatch);
57 > addSettingMapping('hoverHighlight', colorRegistry.editorHoverHighlight);
58 > addSettingMapping('wordHighlight', 'editor.wordHighlightBackground'); // inlined to avoid editor/contrib dependenies
59 > addSettingMapping('wordHighlightStrong', 'editor.wordHighlightStrongBackground');
60 > addSettingMapping('findRangeHighlight', colorRegistry.editorFindRangeHighlight);
61 > addSettingMapping('findMatchHighlight', 'peekViewResult.matchHighlightBackground');
62 > addSettingMapping('referenceHighlight', 'peekViewEditor.matchHighlightBackground');
63 > addSettingMapping('lineHighlight', editorColorRegistry.editorLineHighlight);
64 > addSettingMapping('rangeHighlight', editorColorRegistry.editorRangeHighlight);
65 > addSettingMapping('caret', editorColorRegistry.editorCursorForeground);
66 > addSettingMapping('invisibles', editorColorRegistry.editorWhitespaces);
67 > addSettingMapping('guide', editorColorRegistry.editorIndentGuide1);
68 > addSettingMapping('activeGuide', editorColorRegistry.editorActiveIndentGuide1);
69 >
70 > const ansiColorMap = ['ansiBlack', 'ansiRed', 'ansiGreen', 'ansiYellow', 'ansiBlue', 'ansiMagenta', 'ansiCyan', 'ansiWhite',
71 > 'ansiBrightBlack', 'ansiBrightRed', 'ansiBrightGreen', 'ansiBrightYellow', 'ansiBrightBlue', 'ansiBrightMagenta', 'ansiBrightCyan', 'ansiBrightWhite'
72 > ];
73 >
74 > for (const color of ansiColorMap) {
75 > addSettingMapping(color, 'terminal.' + color);
76 > }