extHost.protocol.ts 22.8 KB
Newer Older
1 2 3 4 5 6 7 8 9
/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/
'use strict';

import {
	createMainContextProxyIdentifier as createMainId,
	createExtHostContextProxyIdentifier as createExtId,
10 11
	ProxyIdentifier, IThreadService
} from 'vs/workbench/services/thread/common/threadService';
12

13 14 15 16
import * as vscode from 'vscode';

import URI from 'vs/base/common/uri';
import Severity from 'vs/base/common/severity';
17
import { TPromise } from 'vs/base/common/winjs.base';
18

19 20
import { IMarkerData } from 'vs/platform/markers/common/markers';
import { Position as EditorPosition } from 'vs/platform/editor/common/editor';
A
Alex Dima 已提交
21
import { IExtensionDescription } from 'vs/platform/extensions/common/extensions';
22 23
import { StatusbarAlignment as MainThreadStatusBarAlignment } from 'vs/platform/statusbar/common/statusbar';
import { ITelemetryInfo } from 'vs/platform/telemetry/common/telemetry';
24
import { ICommandHandlerDescription } from 'vs/platform/commands/common/commands';
25
import { IWorkspace } from 'vs/platform/workspace/common/workspace';
26 27 28

import * as editorCommon from 'vs/editor/common/editorCommon';
import * as modes from 'vs/editor/common/modes';
29
import { IResourceEdit } from 'vs/editor/common/services/bulkEdit';
30

31
import { ConfigurationTarget } from 'vs/workbench/services/configuration/common/configurationEditing';
32
import { IWorkspaceConfigurationValues } from 'vs/workbench/services/configuration/common/configuration';
33

J
Johannes Rieken 已提交
34
import { IPickOpenEntry, IPickOptions } from 'vs/platform/quickOpen/common/quickOpen';
35
import { SaveReason } from 'vs/workbench/services/textfile/common/textfiles';
36
import { IWorkspaceSymbol } from 'vs/workbench/parts/search/common/search';
37
import { IApplyEditsOptions, IUndoStopOptions, TextEditorRevealType, ITextEditorConfigurationUpdate, IResolvedTextEditorConfiguration, ISelectionChangeEvent } from './mainThreadEditorsTracker';
38

P
Pine Wu 已提交
39
import { InternalTreeExplorerNodeContent } from 'vs/workbench/parts/explorers/common/treeExplorerViewModel';
40

41
export interface IEnvironment {
42
	enableProposedApi: boolean;
43 44 45 46 47 48 49 50 51 52 53 54 55 56
	appSettingsHome: string;
	disableExtensions: boolean;
	userExtensionsHome: string;
	extensionDevelopmentPath: string;
	extensionTestsPath: string;
}

export interface IInitData {
	parentPid: number;
	environment: IEnvironment;
	contextService: {
		workspace: IWorkspace;
	};
	extensions: IExtensionDescription[];
57
	configuration: IWorkspaceConfigurationValues;
58
	telemetryInfo: ITelemetryInfo;
59 60
}

61
export interface InstanceSetter<T> {
62
	set<R extends T>(instance: T): R;
63 64 65
}

export class InstanceCollection {
66
	private _items: { [id: string]: any; };
67 68 69 70 71

	constructor() {
		this._items = Object.create(null);
	}

72
	public define<T>(id: ProxyIdentifier<T>): InstanceSetter<T> {
73 74
		let that = this;
		return new class {
75
			set(value: T) {
76 77 78 79 80 81
				that._set(id, value);
				return value;
			}
		};
	}

82
	_set<T>(id: ProxyIdentifier<T>, value: T): void {
83 84 85
		this._items[id.id] = value;
	}

86
	public finish(isMain: boolean, threadService: IThreadService): void {
87 88 89 90 91 92 93 94 95 96 97 98
		let expected = (isMain ? MainContext : ExtHostContext);
		Object.keys(expected).forEach((key) => {
			let id = expected[key];
			let value = this._items[id.id];

			if (!value) {
				throw new Error(`Missing actor ${key} (isMain: ${id.isMain}, id:  ${id.id})`);
			}
			threadService.set<any>(id, value);
		});
	}
}
99 100 101 102 103 104 105

function ni() { return new Error('Not implemented'); }

// --- main thread

export abstract class MainThreadCommandsShape {
	$registerCommand(id: string): TPromise<any> { throw ni(); }
J
Johannes Rieken 已提交
106
	$unregisterCommand(id: string): TPromise<any> { throw ni(); }
107 108 109 110
	$executeCommand<T>(id: string, args: any[]): Thenable<T> { throw ni(); }
	$getCommands(): Thenable<string[]> { throw ni(); }
}

111
export abstract class MainThreadConfigurationShape {
112
	$updateConfigurationOption(target: ConfigurationTarget, key: string, value: any): TPromise<void> { throw ni(); }
113
	$removeConfigurationOption(target: ConfigurationTarget, key: string): TPromise<void> { throw ni(); }
114 115
}

116 117 118 119 120 121
export abstract class MainThreadDiagnosticsShape {
	$changeMany(owner: string, entries: [URI, IMarkerData[]][]): TPromise<any> { throw ni(); }
	$clear(owner: string): TPromise<any> { throw ni(); }
}

export abstract class MainThreadDocumentsShape {
B
Benjamin Pasero 已提交
122
	$tryCreateDocument(options?: { language: string; }): TPromise<any> { throw ni(); }
123
	$tryOpenDocument(uri: URI): TPromise<any> { throw ni(); }
124
	$registerTextContentProvider(handle: number, scheme: string): void { throw ni(); }
125
	$onVirtualDocumentChange(uri: URI, value: editorCommon.IRawText): void { throw ni(); }
126
	$unregisterTextContentProvider(handle: number): void { throw ni(); }
127
	$trySaveDocument(uri: URI): TPromise<boolean> { throw ni(); }
128 129 130
}

export abstract class MainThreadEditorsShape {
131 132 133 134 135 136 137 138 139
	$tryShowTextDocument(resource: URI, position: EditorPosition, preserveFocus: boolean): TPromise<string> { throw ni(); }
	$registerTextEditorDecorationType(key: string, options: editorCommon.IDecorationRenderOptions): void { throw ni(); }
	$removeTextEditorDecorationType(key: string): void { throw ni(); }
	$tryShowEditor(id: string, position: EditorPosition): TPromise<void> { throw ni(); }
	$tryHideEditor(id: string): TPromise<void> { throw ni(); }
	$trySetOptions(id: string, options: ITextEditorConfigurationUpdate): TPromise<any> { throw ni(); }
	$trySetDecorations(id: string, key: string, ranges: editorCommon.IDecorationOptions[]): TPromise<any> { throw ni(); }
	$tryRevealRange(id: string, range: editorCommon.IRange, revealType: TextEditorRevealType): TPromise<any> { throw ni(); }
	$trySetSelections(id: string, selections: editorCommon.ISelection[]): TPromise<any> { throw ni(); }
140
	$tryApplyEdits(id: string, modelVersionId: number, edits: editorCommon.ISingleEditOperation[], opts: IApplyEditsOptions): TPromise<boolean> { throw ni(); }
141
	$tryInsertSnippet(id: string, template: string, selections: editorCommon.IRange[], opts: IUndoStopOptions): TPromise<any> { throw ni(); }
142 143
}

144
export abstract class MainThreadTreeExplorersShape {
145
	$registerTreeExplorerNodeProvider(providerId: string): void { throw ni(); }
146 147
}

148 149 150 151 152 153 154
export abstract class MainThreadErrorsShape {
	onUnexpectedExtHostError(err: any): void { throw ni(); }
}

export abstract class MainThreadLanguageFeaturesShape {
	$unregister(handle: number): TPromise<any> { throw ni(); }
	$registerOutlineSupport(handle: number, selector: vscode.DocumentSelector): TPromise<any> { throw ni(); }
155 156
	$registerCodeLensSupport(handle: number, selector: vscode.DocumentSelector, eventHandle: number): TPromise<any> { throw ni(); }
	$emitCodeLensEvent(eventHandle: number, event?: any): TPromise<any> { throw ni(); }
157
	$registerDeclaractionSupport(handle: number, selector: vscode.DocumentSelector): TPromise<any> { throw ni(); }
158
	$registerImplementationSupport(handle: number, selector: vscode.DocumentSelector): TPromise<any> { throw ni(); }
159 160 161 162 163 164 165 166 167 168 169
	$registerHoverProvider(handle: number, selector: vscode.DocumentSelector): TPromise<any> { throw ni(); }
	$registerDocumentHighlightProvider(handle: number, selector: vscode.DocumentSelector): TPromise<any> { throw ni(); }
	$registerReferenceSupport(handle: number, selector: vscode.DocumentSelector): TPromise<any> { throw ni(); }
	$registerQuickFixSupport(handle: number, selector: vscode.DocumentSelector): TPromise<any> { throw ni(); }
	$registerDocumentFormattingSupport(handle: number, selector: vscode.DocumentSelector): TPromise<any> { throw ni(); }
	$registerRangeFormattingSupport(handle: number, selector: vscode.DocumentSelector): TPromise<any> { throw ni(); }
	$registerOnTypeFormattingSupport(handle: number, selector: vscode.DocumentSelector, autoFormatTriggerCharacters: string[]): TPromise<any> { throw ni(); }
	$registerNavigateTypeSupport(handle: number): TPromise<any> { throw ni(); }
	$registerRenameSupport(handle: number, selector: vscode.DocumentSelector): TPromise<any> { throw ni(); }
	$registerSuggestSupport(handle: number, selector: vscode.DocumentSelector, triggerCharacters: string[]): TPromise<any> { throw ni(); }
	$registerSignatureHelpProvider(handle: number, selector: vscode.DocumentSelector, triggerCharacter: string[]): TPromise<any> { throw ni(); }
J
Johannes Rieken 已提交
170
	$registerDocumentLinkProvider(handle: number, selector: vscode.DocumentSelector): TPromise<any> { throw ni(); }
171
	$setLanguageConfiguration(handle: number, languageId: string, configuration: vscode.LanguageConfiguration): TPromise<any> { throw ni(); }
172 173 174
}

export abstract class MainThreadLanguagesShape {
175
	$getLanguages(): TPromise<string[]> { throw ni(); }
176 177 178 179 180 181 182
}

export abstract class MainThreadMessageServiceShape {
	$showMessage(severity: Severity, message: string, commands: { title: string; isCloseAffordance: boolean; handle: number; }[]): Thenable<number> { throw ni(); }
}

export abstract class MainThreadOutputServiceShape {
183 184 185 186
	$append(channelId: string, label: string, value: string): TPromise<void> { throw ni(); }
	$clear(channelId: string, label: string): TPromise<void> { throw ni(); }
	$reveal(channelId: string, label: string, preserveFocus: boolean): TPromise<void> { throw ni(); }
	$close(channelId: string): TPromise<void> { throw ni(); }
187 188
}

189
export abstract class MainThreadProgressShape {
190 191 192

	$startWindow(handle: number, title: string): void { throw ni(); };
	$startScm(handle: number): void { throw ni(); };
193
	$progressReport(handle: number, message: string): void { throw ni(); }
194
	$progressEnd(handle: number): void { throw ni(); }
195 196
}

D
Daniel Imms 已提交
197
export abstract class MainThreadTerminalServiceShape {
198
	$createTerminal(name?: string, shellPath?: string, shellArgs?: string[], waitOnExit?: boolean): TPromise<number> { throw ni(); }
D
Daniel Imms 已提交
199 200
	$dispose(terminalId: number): void { throw ni(); }
	$hide(terminalId: number): void { throw ni(); }
D
Daniel Imms 已提交
201
	$sendText(terminalId: number, text: string, addNewLine: boolean): void { throw ni(); }
D
Daniel Imms 已提交
202
	$show(terminalId: number, preserveFocus: boolean): void { throw ni(); }
D
Daniel Imms 已提交
203 204
}

205 206 207 208 209 210 211
export interface MyQuickPickItems extends IPickOpenEntry {
	handle: number;
}
export abstract class MainThreadQuickOpenShape {
	$show(options: IPickOptions): Thenable<number> { throw ni(); }
	$setItems(items: MyQuickPickItems[]): Thenable<any> { throw ni(); }
	$setError(error: Error): Thenable<any> { throw ni(); }
212
	$input(options: vscode.InputBoxOptions, validateInput: boolean): TPromise<string> { throw ni(); }
213 214 215
}

export abstract class MainThreadStatusBarShape {
216
	$setEntry(id: number, extensionId: string, text: string, tooltip: string, command: string, color: string, alignment: MainThreadStatusBarAlignment, priority: number): void { throw ni(); }
217
	$dispose(id: number) { throw ni(); }
218 219 220
}

export abstract class MainThreadStorageShape {
221 222
	$getValue<T>(shared: boolean, key: string): TPromise<T> { throw ni(); }
	$setValue(shared: boolean, key: string, value: any): TPromise<any> { throw ni(); }
223 224 225 226 227 228 229 230 231 232 233 234 235 236 237
}

export abstract class MainThreadTelemetryShape {
	$publicLog(eventName: string, data?: any): void { throw ni(); }
	$getTelemetryInfo(): TPromise<ITelemetryInfo> { throw ni(); }
}

export abstract class MainThreadWorkspaceShape {
	$startSearch(include: string, exclude: string, maxResults: number, requestId: number): Thenable<URI[]> { throw ni(); }
	$cancelSearch(requestId: number): Thenable<boolean> { throw ni(); }
	$saveAll(includeUntitled?: boolean): Thenable<boolean> { throw ni(); }
	$applyWorkspaceEdit(edits: IResourceEdit[]): TPromise<boolean> { throw ni(); }
}

export abstract class MainProcessExtensionServiceShape {
A
Alex Dima 已提交
238 239 240
	$localShowMessage(severity: Severity, msg: string): void { throw ni(); }
	$onExtensionActivated(extensionId: string): void { throw ni(); }
	$onExtensionActivationFailed(extensionId: string): void { throw ni(); }
241 242
}

J
Joao Moreno 已提交
243
export interface SCMProviderFeatures {
J
Joao Moreno 已提交
244
	label: string;
J
Joao Moreno 已提交
245 246
	supportsOpen: boolean;
	supportsDrag: boolean;
J
Joao Moreno 已提交
247 248 249
	supportsOriginalResource: boolean;
}

J
Joao Moreno 已提交
250 251 252 253 254
export type SCMRawResource = [
	string /*uri*/,
	string[] /*icons: light, dark*/,
	boolean /*strike through*/
];
J
Joao Moreno 已提交
255
export type SCMRawResourceGroup = [string /*id*/, string /*label*/, SCMRawResource[]];
J
Joao Moreno 已提交
256

J
Joao Moreno 已提交
257
export abstract class MainThreadSCMShape {
J
Joao Moreno 已提交
258
	$register(id: string, features: SCMProviderFeatures): void { throw ni(); }
J
Joao Moreno 已提交
259
	$unregister(id: string): void { throw ni(); }
J
Joao Moreno 已提交
260
	$onChange(id: string, resources: SCMRawResourceGroup[], count: number | undefined): void { throw ni(); }
J
Joao Moreno 已提交
261 262
}

263 264 265 266 267 268 269 270
// -- extension host

export abstract class ExtHostCommandsShape {
	$executeContributedCommand<T>(id: string, ...args: any[]): Thenable<T> { throw ni(); }
	$getContributedCommandHandlerDescriptions(): TPromise<{ [id: string]: string | ICommandHandlerDescription }> { throw ni(); }
}

export abstract class ExtHostConfigurationShape {
271
	$acceptConfigurationChanged(values: IWorkspaceConfigurationValues) { throw ni(); }
272 273 274 275 276 277 278 279 280 281 282 283 284 285 286
}

export abstract class ExtHostDiagnosticsShape {

}

export interface IModelAddedData {
	url: URI;
	versionId: number;
	value: editorCommon.IRawText;
	modeId: string;
	isDirty: boolean;
}
export abstract class ExtHostDocumentsShape {
	$provideTextDocumentContent(handle: number, uri: URI): TPromise<string> { throw ni(); }
287 288 289 290 291 292
	$acceptModelAdd(initData: IModelAddedData): void { throw ni(); }
	$acceptModelModeChanged(strURL: string, oldModeId: string, newModeId: string): void { throw ni(); }
	$acceptModelSaved(strURL: string): void { throw ni(); }
	$acceptModelDirty(strURL: string): void { throw ni(); }
	$acceptModelReverted(strURL: string): void { throw ni(); }
	$acceptModelRemoved(strURL: string): void { throw ni(); }
293
	$acceptModelChanged(strURL: string, events: editorCommon.IModelContentChangedEvent2[], isDirty: boolean): void { throw ni(); }
294 295
}

296
export abstract class ExtHostDocumentSaveParticipantShape {
297
	$participateInSave(resource: URI, reason: SaveReason): TPromise<boolean[]> { throw ni(); }
298 299
}

300 301 302 303 304 305 306 307 308 309 310
export interface ITextEditorAddData {
	id: string;
	document: URI;
	options: IResolvedTextEditorConfiguration;
	selections: editorCommon.ISelection[];
	editorPosition: EditorPosition;
}
export interface ITextEditorPositionData {
	[id: string]: EditorPosition;
}
export abstract class ExtHostEditorsShape {
311 312
	$acceptTextEditorAdd(data: ITextEditorAddData): void { throw ni(); }
	$acceptOptionsChanged(id: string, opts: IResolvedTextEditorConfiguration): void { throw ni(); }
313
	$acceptSelectionsChanged(id: string, event: ISelectionChangeEvent): void { throw ni(); }
314 315 316
	$acceptActiveEditorAndVisibleEditors(id: string, visibleIds: string[]): void { throw ni(); }
	$acceptEditorPositionData(data: ITextEditorPositionData): void { throw ni(); }
	$acceptTextEditorRemove(id: string): void { throw ni(); }
317 318
}

319
export abstract class ExtHostTreeExplorersShape {
P
Pine Wu 已提交
320 321 322
	$provideRootNode(providerId: string): TPromise<InternalTreeExplorerNodeContent> { throw ni(); };
	$resolveChildren(providerId: string, node: InternalTreeExplorerNodeContent): TPromise<InternalTreeExplorerNodeContent[]> { throw ni(); }
	$getInternalCommand(providerId: string, node: InternalTreeExplorerNodeContent): TPromise<modes.Command> { throw ni(); }
323 324
}

325 326 327 328 329 330 331 332 333 334 335
export abstract class ExtHostExtensionServiceShape {
	$localShowMessage(severity: Severity, msg: string): void { throw ni(); }
	$activateExtension(extensionDescription: IExtensionDescription): TPromise<void> { throw ni(); }
}

export interface FileSystemEvents {
	created: URI[];
	changed: URI[];
	deleted: URI[];
}
export abstract class ExtHostFileSystemEventServiceShape {
336
	$onFileEvent(events: FileSystemEvents) { throw ni(); }
337 338
}

J
Johannes Rieken 已提交
339 340 341 342 343
export interface ObjectIdentifier {
	$ident: number;
}

export namespace ObjectIdentifier {
344
	export const name = '$ident';
J
Johannes Rieken 已提交
345
	export function mixin<T>(obj: T, id: number): T & ObjectIdentifier {
346
		Object.defineProperty(obj, name, { value: id, enumerable: true });
J
Johannes Rieken 已提交
347 348
		return <T & ObjectIdentifier>obj;
	}
349 350
	export function of(obj: any): number {
		return obj[name];
J
Johannes Rieken 已提交
351 352 353
	}
}

J
Johannes Rieken 已提交
354
export abstract class ExtHostHeapServiceShape {
355 356 357
	$onGarbageCollection(ids: number[]): void { throw ni(); }
}

358 359 360 361 362
export abstract class ExtHostLanguageFeaturesShape {
	$provideDocumentSymbols(handle: number, resource: URI): TPromise<modes.SymbolInformation[]> { throw ni(); }
	$provideCodeLenses(handle: number, resource: URI): TPromise<modes.ICodeLensSymbol[]> { throw ni(); }
	$resolveCodeLens(handle: number, resource: URI, symbol: modes.ICodeLensSymbol): TPromise<modes.ICodeLensSymbol> { throw ni(); }
	$provideDefinition(handle: number, resource: URI, position: editorCommon.IPosition): TPromise<modes.Definition> { throw ni(); }
M
Matt Bierner 已提交
363
	$provideImplementation(handle: number, resource: URI, position: editorCommon.IPosition): TPromise<modes.Definition> { throw ni(); }
364 365 366 367 368 369 370
	$provideHover(handle: number, resource: URI, position: editorCommon.IPosition): TPromise<modes.Hover> { throw ni(); }
	$provideDocumentHighlights(handle: number, resource: URI, position: editorCommon.IPosition): TPromise<modes.DocumentHighlight[]> { throw ni(); }
	$provideReferences(handle: number, resource: URI, position: editorCommon.IPosition, context: modes.ReferenceContext): TPromise<modes.Location[]> { throw ni(); }
	$provideCodeActions(handle: number, resource: URI, range: editorCommon.IRange): TPromise<modes.CodeAction[]> { throw ni(); }
	$provideDocumentFormattingEdits(handle: number, resource: URI, options: modes.FormattingOptions): TPromise<editorCommon.ISingleEditOperation[]> { throw ni(); }
	$provideDocumentRangeFormattingEdits(handle: number, resource: URI, range: editorCommon.IRange, options: modes.FormattingOptions): TPromise<editorCommon.ISingleEditOperation[]> { throw ni(); }
	$provideOnTypeFormattingEdits(handle: number, resource: URI, position: editorCommon.IPosition, ch: string, options: modes.FormattingOptions): TPromise<editorCommon.ISingleEditOperation[]> { throw ni(); }
371 372
	$provideWorkspaceSymbols(handle: number, search: string): TPromise<IWorkspaceSymbol[]> { throw ni(); }
	$resolveWorkspaceSymbol(handle: number, symbol: IWorkspaceSymbol): TPromise<IWorkspaceSymbol> { throw ni(); }
373
	$provideRenameEdits(handle: number, resource: URI, position: editorCommon.IPosition, newName: string): TPromise<modes.WorkspaceEdit> { throw ni(); }
374
	$provideCompletionItems(handle: number, resource: URI, position: editorCommon.IPosition): TPromise<modes.ISuggestResult> { throw ni(); }
375 376
	$resolveCompletionItem(handle: number, resource: URI, position: editorCommon.IPosition, suggestion: modes.ISuggestion): TPromise<modes.ISuggestion> { throw ni(); }
	$provideSignatureHelp(handle: number, resource: URI, position: editorCommon.IPosition): TPromise<modes.SignatureHelp> { throw ni(); }
377 378
	$provideDocumentLinks(handle: number, resource: URI): TPromise<modes.ILink[]> { throw ni(); }
	$resolveDocumentLink(handle: number, link: modes.ILink): TPromise<modes.ILink> { throw ni(); }
379 380 381 382 383 384 385
}

export abstract class ExtHostQuickOpenShape {
	$onItemSelected(handle: number): void { throw ni(); }
	$validateInput(input: string): TPromise<string> { throw ni(); }
}

386 387
export abstract class ExtHostTerminalServiceShape {
	$acceptTerminalClosed(id: number): void { throw ni(); }
388
	$acceptTerminalProcessId(id: number, processId: number): void { throw ni(); }
389 390
}

J
Joao Moreno 已提交
391
export abstract class ExtHostSCMShape {
J
Joao Moreno 已提交
392 393
	$open(id: string, resourceGroupId: string, uri: string): TPromise<void> { throw ni(); }
	$drag(id: string, fromResourceGroupId: string, fromUri: string, toResourceGroupId: string): TPromise<void> { throw ni(); }
J
Joao Moreno 已提交
394
	$getOriginalResource(id: string, uri: URI): TPromise<URI> { throw ni(); }
J
Joao Moreno 已提交
395 396
}

397 398 399 400
// --- proxy identifiers

export const MainContext = {
	MainThreadCommands: createMainId<MainThreadCommandsShape>('MainThreadCommands', MainThreadCommandsShape),
401
	MainThreadConfiguration: createMainId<MainThreadConfigurationShape>('MainThreadConfiguration', MainThreadConfigurationShape),
402 403 404 405
	MainThreadDiagnostics: createMainId<MainThreadDiagnosticsShape>('MainThreadDiagnostics', MainThreadDiagnosticsShape),
	MainThreadDocuments: createMainId<MainThreadDocumentsShape>('MainThreadDocuments', MainThreadDocumentsShape),
	MainThreadEditors: createMainId<MainThreadEditorsShape>('MainThreadEditors', MainThreadEditorsShape),
	MainThreadErrors: createMainId<MainThreadErrorsShape>('MainThreadErrors', MainThreadErrorsShape),
406
	MainThreadExplorers: createMainId<MainThreadTreeExplorersShape>('MainThreadExplorers', MainThreadTreeExplorersShape),
407 408 409 410
	MainThreadLanguageFeatures: createMainId<MainThreadLanguageFeaturesShape>('MainThreadLanguageFeatures', MainThreadLanguageFeaturesShape),
	MainThreadLanguages: createMainId<MainThreadLanguagesShape>('MainThreadLanguages', MainThreadLanguagesShape),
	MainThreadMessageService: createMainId<MainThreadMessageServiceShape>('MainThreadMessageService', MainThreadMessageServiceShape),
	MainThreadOutputService: createMainId<MainThreadOutputServiceShape>('MainThreadOutputService', MainThreadOutputServiceShape),
411
	MainThreadProgress: createMainId<MainThreadProgressShape>('MainThreadProgress', MainThreadProgressShape),
412 413 414 415
	MainThreadQuickOpen: createMainId<MainThreadQuickOpenShape>('MainThreadQuickOpen', MainThreadQuickOpenShape),
	MainThreadStatusBar: createMainId<MainThreadStatusBarShape>('MainThreadStatusBar', MainThreadStatusBarShape),
	MainThreadStorage: createMainId<MainThreadStorageShape>('MainThreadStorage', MainThreadStorageShape),
	MainThreadTelemetry: createMainId<MainThreadTelemetryShape>('MainThreadTelemetry', MainThreadTelemetryShape),
D
Daniel Imms 已提交
416
	MainThreadTerminalService: createMainId<MainThreadTerminalServiceShape>('MainThreadTerminalService', MainThreadTerminalServiceShape),
417 418
	MainThreadWorkspace: createMainId<MainThreadWorkspaceShape>('MainThreadWorkspace', MainThreadWorkspaceShape),
	MainProcessExtensionService: createMainId<MainProcessExtensionServiceShape>('MainProcessExtensionService', MainProcessExtensionServiceShape),
J
Joao Moreno 已提交
419
	MainThreadSCM: createMainId<MainThreadSCMShape>('MainThreadSCM', MainThreadSCMShape)
420 421 422 423 424 425 426
};

export const ExtHostContext = {
	ExtHostCommands: createExtId<ExtHostCommandsShape>('ExtHostCommands', ExtHostCommandsShape),
	ExtHostConfiguration: createExtId<ExtHostConfigurationShape>('ExtHostConfiguration', ExtHostConfigurationShape),
	ExtHostDiagnostics: createExtId<ExtHostDiagnosticsShape>('ExtHostDiagnostics', ExtHostDiagnosticsShape),
	ExtHostDocuments: createExtId<ExtHostDocumentsShape>('ExtHostDocuments', ExtHostDocumentsShape),
427
	ExtHostDocumentSaveParticipant: createExtId<ExtHostDocumentSaveParticipantShape>('ExtHostDocumentSaveParticipant', ExtHostDocumentSaveParticipantShape),
428
	ExtHostEditors: createExtId<ExtHostEditorsShape>('ExtHostEditors', ExtHostEditorsShape),
429
	ExtHostExplorers: createExtId<ExtHostTreeExplorersShape>('ExtHostExplorers', ExtHostTreeExplorersShape),
430
	ExtHostFileSystemEventService: createExtId<ExtHostFileSystemEventServiceShape>('ExtHostFileSystemEventService', ExtHostFileSystemEventServiceShape),
J
Johannes Rieken 已提交
431
	ExtHostHeapService: createExtId<ExtHostHeapServiceShape>('ExtHostHeapMonitor', ExtHostHeapServiceShape),
432 433 434
	ExtHostLanguageFeatures: createExtId<ExtHostLanguageFeaturesShape>('ExtHostLanguageFeatures', ExtHostLanguageFeaturesShape),
	ExtHostQuickOpen: createExtId<ExtHostQuickOpenShape>('ExtHostQuickOpen', ExtHostQuickOpenShape),
	ExtHostExtensionService: createExtId<ExtHostExtensionServiceShape>('ExtHostExtensionService', ExtHostExtensionServiceShape),
J
Joao Moreno 已提交
435 436
	ExtHostTerminalService: createExtId<ExtHostTerminalServiceShape>('ExtHostTerminalService', ExtHostTerminalServiceShape),
	ExtHostSCM: createExtId<ExtHostSCMShape>('ExtHostSCM', ExtHostSCMShape)
437
};