extensionHostKind.ts ×12

Frontier kind: Code frontier

unlabeled · c_d852b75600da

40 tests · 17422 LOC · 77 files · introduces 0 tests · 50 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
12 ranges50 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
2031 ranges17422 lines · 77 files · Browse complete extent
All tests (intent)
40 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: 50 introduced LOC across 12 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/workbench/services/extensions/common/extensionHostKind.ts 50 introduced LOC · 12 ranges

Open complete file

1 > /*--------------------------------------------------------------------------------------------- extensionHostKind.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 { ExtensionKind } from '../../../../platform/environment/common/environment.js';
7 > import { ExtensionIdentifier, IExtensionDescription } from '../../../../platform/extensions/common/extensions.js';
8 >
9 > export const enum ExtensionHostKind {
10 > LocalProcess = 1,
11 > LocalWebWorker = 2,
12 > Remote = 3
13 > }
14 >
15 > export function extensionHostKindToString(kind: ExtensionHostKind | null): string {
16 if (kind === null) {
17 return 'None';
23 }
24 }
26 > export const enum ExtensionRunningPreference {
27 > None,
28 > Local,
29 > Remote
30 > }
31 >
32 > export function extensionRunningPreferenceToString(preference: ExtensionRunningPreference) {
33 switch (preference) {
34 case ExtensionRunningPreference.None:
40 }
41 }
43 > export interface IExtensionHostKindPicker {
44 > pickExtensionHostKind(extensionId: ExtensionIdentifier, extensionKinds: ExtensionKind[], isInstalledLocally: boolean, isInstalledRemotely: boolean, preference: ExtensionRunningPreference): ExtensionHostKind | null;
45 > }
46 >
47 > export function determineExtensionHostKinds(
48 _localExtensions: IExtensionDescription[],
49 _remoteExtensions: IExtensionDescription[],
87 return extensionHostKinds;
88 }
90 function toExtensionWithKind(
91 extensions: IExtensionDescription[],
99 return result;
100 }
102 > class ExtensionWithKind {
103 >
104 > constructor(
105 public readonly desc: IExtensionDescription,
106 public readonly kind: ExtensionKind[]
107 ) { }
109 > public get key(): string {
110 return ExtensionIdentifier.toKey(this.desc.identifier);
111 }
113 > public get isUnderDevelopment(): boolean {
114 return this.desc.isUnderDevelopment;
115 }
117 >
118 > class ExtensionInfo {
119 >
120 > constructor(
121 public readonly local: ExtensionWithKind | null,
122 public readonly remote: ExtensionWithKind | null,
123 ) { }
125 > public get key(): string {
126 if (this.local) {
127 return this.local.key;
129 return this.remote!.key;
130 }
132 > public get identifier(): ExtensionIdentifier {
133 if (this.local) {
134 return this.local.desc.identifier;
136 return this.remote!.desc.identifier;
137 }
139 > public get kind(): ExtensionKind[] {
140 // in case of disagreements between extension kinds, it is always
141 // better to pick the local extension because it has a much higher