extHost.protocol.ts 59.0 KB
Newer Older
1 2 3 4 5
/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/

6
import { VSBuffer } from 'vs/base/common/buffer';
A
Alex Dima 已提交
7
import { CancellationToken } from 'vs/base/common/cancellation';
8
import { IRemoteConsoleLog } from 'vs/base/common/console';
R
Rob Lourens 已提交
9
import { SerializedError } from 'vs/base/common/errors';
10 11
import { IRelativePattern } from 'vs/base/common/glob';
import { IMarkdownString } from 'vs/base/common/htmlContent';
R
Rob Lourens 已提交
12
import { IDisposable } from 'vs/base/common/lifecycle';
13
import Severity from 'vs/base/common/severity';
14
import { URI, UriComponents } from 'vs/base/common/uri';
15
import { RenderLineNumbersType, TextEditorCursorStyle } from 'vs/editor/common/config/editorOptions';
16 17
import { IPosition } from 'vs/editor/common/core/position';
import { IRange } from 'vs/editor/common/core/range';
18
import { ISelection, Selection } from 'vs/editor/common/core/selection';
R
Rob Lourens 已提交
19
import * as editorCommon from 'vs/editor/common/editorCommon';
20
import { EndOfLineSequence, ISingleEditOperation } from 'vs/editor/common/model';
R
Rob Lourens 已提交
21 22 23
import { IModelChangedEvent } from 'vs/editor/common/model/mirrorTextModel';
import * as modes from 'vs/editor/common/modes';
import { CharacterPair, CommentRule, EnterAction } from 'vs/editor/common/modes/languageConfiguration';
24
import { ICommandHandlerDescription, ICommandEvent } from 'vs/platform/commands/common/commands';
R
Rob Lourens 已提交
25 26
import { ConfigurationTarget, IConfigurationData, IConfigurationModel } from 'vs/platform/configuration/common/configuration';
import { ConfigurationScope } from 'vs/platform/configuration/common/configurationRegistry';
27
import { ExtensionIdentifier, IExtensionDescription } from 'vs/platform/extensions/common/extensions';
J
Johannes Rieken 已提交
28
import * as files from 'vs/platform/files/common/files';
29
import { ResourceLabelFormatter } from 'vs/platform/label/common/label';
S
Sandeep Somavarapu 已提交
30
import { LogLevel } from 'vs/platform/log/common/log';
R
Rob Lourens 已提交
31
import { IMarkerData } from 'vs/platform/markers/common/markers';
32
import { IProgressOptions, IProgressStep } from 'vs/platform/progress/common/progress';
J
Johannes Rieken 已提交
33
import * as quickInput from 'vs/platform/quickinput/common/quickInput';
34
import { RemoteAuthorityResolverErrorCode, ResolverResult } from 'vs/platform/remote/common/remoteAuthorityResolver';
J
Johannes Rieken 已提交
35
import * as statusbar from 'vs/platform/statusbar/common/statusbar';
36
import { ClassifiedEvent, GDPRClassification, StrictPropertyCheck } from 'vs/platform/telemetry/common/gdprTypings';
R
Rob Lourens 已提交
37 38
import { ITelemetryInfo } from 'vs/platform/telemetry/common/telemetry';
import { ThemeColor } from 'vs/platform/theme/common/themeService';
39 40
import { EditorViewColumn } from 'vs/workbench/api/common/shared/editor';
import * as tasks from 'vs/workbench/api/common/shared/tasks';
41 42
import { IRevealOptions, ITreeItem } from 'vs/workbench/common/views';
import * as callHierarchy from 'vs/workbench/contrib/callHierarchy/common/callHierarchy';
43
import { IAdapterDescriptor, IConfig } from 'vs/workbench/contrib/debug/common/debug';
44
import { ITextQueryBuilderOptions } from 'vs/workbench/contrib/search/common/queryBuilder';
45
import { ITerminalDimensions, IShellLaunchConfig } from 'vs/workbench/contrib/terminal/common/terminal';
46
import { ExtensionActivationError } from 'vs/workbench/services/extensions/common/extensions';
47 48
import { createExtHostContextProxyIdentifier as createExtId, createMainContextProxyIdentifier as createMainId, IRPCProtocol } from 'vs/workbench/services/extensions/common/proxyIdentifier';
import * as search from 'vs/workbench/services/search/common/search';
R
Rob Lourens 已提交
49
import { SaveReason } from 'vs/workbench/services/textfile/common/textfiles';
S
Sandeep Somavarapu 已提交
50

51
export interface IEnvironment {
52
	isExtensionDevelopmentDebug: boolean;
53
	appName: string;
54
	appRoot?: URI;
55 56
	appLanguage: string;
	appUriScheme: string;
57
	appSettingsHome?: URI;
58
	extensionDevelopmentLocationURI?: URI[];
59
	extensionTestsLocationURI?: URI;
A
Alex Dima 已提交
60
	globalStorageHome: URI;
D
Daniel Imms 已提交
61
	userHome: URI;
M
Matt Bierner 已提交
62
	webviewResourceRoot: string;
63
	webviewCspSource: string;
64 65
}

66
export interface IStaticWorkspaceData {
67
	id: string;
68
	name: string;
A
Alex Dima 已提交
69
	configuration?: UriComponents | null;
70
	isUntitled?: boolean | null;
71 72
}

73 74 75 76
export interface IWorkspaceData extends IStaticWorkspaceData {
	folders: { uri: UriComponents, name: string, index: number }[];
}

77
export interface IInitData {
78
	version: string;
79
	commit?: string;
80 81
	parentPid: number;
	environment: IEnvironment;
A
Alex Dima 已提交
82
	workspace?: IStaticWorkspaceData | null;
A
Alex Dima 已提交
83
	resolvedExtensions: ExtensionIdentifier[];
84
	hostExtensions: ExtensionIdentifier[];
85
	extensions: IExtensionDescription[];
86
	telemetryInfo: ITelemetryInfo;
S
Sandeep Somavarapu 已提交
87
	logLevel: LogLevel;
88
	logsLocation: URI;
A
Alex Dima 已提交
89
	autoStart: boolean;
90
	remote: { isRemote: boolean; authority: string | undefined; };
91 92
}

S
Sandeep Somavarapu 已提交
93
export interface IConfigurationInitData extends IConfigurationData {
S
Sandeep Somavarapu 已提交
94
	configurationScopes: [string, ConfigurationScope | undefined][];
S
Sandeep Somavarapu 已提交
95 96
}

97
export interface IWorkspaceConfigurationChangeEventData {
S
Sandeep Somavarapu 已提交
98 99
	changedConfiguration: IConfigurationModel;
	changedConfigurationByResource: { [folder: string]: IConfigurationModel };
100 101
}

A
Alex Dima 已提交
102
export interface IExtHostContext extends IRPCProtocol {
A
Alex Dima 已提交
103
	remoteAuthority: string;
104 105
}

A
Alex Dima 已提交
106
export interface IMainContext extends IRPCProtocol {
107 108
}

109 110
// --- main thread

111 112 113 114 115
export interface MainThreadClipboardShape extends IDisposable {
	$readText(): Promise<string>;
	$writeText(value: string): Promise<void>;
}

116
export interface MainThreadCommandsShape extends IDisposable {
117
	$registerCommand(id: string): void;
118 119
	$registerCommandListener(): void;
	$unregisterCommandListener(): void;
120
	$unregisterCommand(id: string): void;
121
	$executeCommand<T>(id: string, args: any[]): Promise<T | undefined>;
J
Johannes Rieken 已提交
122
	$getCommands(): Promise<string[]>;
123 124
}

R
rebornix 已提交
125
export interface CommentProviderFeatures {
P
Peng Lyu 已提交
126
	reactionGroup?: modes.CommentReaction[];
P
Peng Lyu 已提交
127
	reactionHandler?: boolean;
R
rebornix 已提交
128 129
}

M
Matt Bierner 已提交
130
export interface MainThreadCommentsShape extends IDisposable {
P
Peng Lyu 已提交
131
	$registerCommentController(handle: number, id: string, label: string): void;
132
	$unregisterCommentController(handle: number): void;
P
Peng Lyu 已提交
133
	$updateCommentControllerFeatures(handle: number, features: CommentProviderFeatures): void;
134
	$createCommentThread(handle: number, commentThreadHandle: number, threadId: string, resource: UriComponents, range: IRange, extensionId: ExtensionIdentifier): modes.CommentThread | undefined;
135
	$updateCommentThread(handle: number, commentThreadHandle: number, threadId: string, resource: UriComponents, range: IRange, label: string | undefined, contextValue: string | undefined, comments: modes.Comment[], collapseState: modes.CommentThreadCollapsibleState): void;
P
Peng Lyu 已提交
136
	$deleteCommentThread(handle: number, commentThreadHandle: number): void;
137
	$onDidCommentThreadsChange(handle: number, event: modes.CommentThreadChangedEvent): void;
M
Matt Bierner 已提交
138 139
}

140
export interface MainThreadConfigurationShape extends IDisposable {
141 142
	$updateConfigurationOption(target: ConfigurationTarget | null, key: string, value: any, resource: UriComponents | undefined): Promise<void>;
	$removeConfigurationOption(target: ConfigurationTarget | null, key: string, resource: UriComponents | undefined): Promise<void>;
143 144
}

145
export interface MainThreadDiagnosticsShape extends IDisposable {
146
	$changeMany(owner: string, entries: [UriComponents, IMarkerData[] | undefined][]): void;
147
	$clear(owner: string): void;
148 149
}

150
export interface MainThreadDialogOpenOptions {
151
	defaultUri?: UriComponents;
152
	openLabel?: string;
153 154 155
	canSelectFiles?: boolean;
	canSelectFolders?: boolean;
	canSelectMany?: boolean;
J
Johannes Rieken 已提交
156
	filters?: { [name: string]: string[] };
157 158
}

159
export interface MainThreadDialogSaveOptions {
160
	defaultUri?: UriComponents;
161
	saveLabel?: string;
J
Johannes Rieken 已提交
162
	filters?: { [name: string]: string[] };
163 164
}

165
export interface MainThreadDiaglogsShape extends IDisposable {
166 167
	$showOpenDialog(options: MainThreadDialogOpenOptions): Promise<UriComponents[] | undefined>;
	$showSaveDialog(options: MainThreadDialogSaveOptions): Promise<UriComponents | undefined>;
168 169
}

170 171 172
export interface MainThreadDecorationsShape extends IDisposable {
	$registerDecorationProvider(handle: number, label: string): void;
	$unregisterDecorationProvider(handle: number): void;
173
	$onDidChange(handle: number, resources: UriComponents[] | null): void;
174 175
}

176
export interface MainThreadDocumentContentProvidersShape extends IDisposable {
177 178
	$registerTextContentProvider(handle: number, scheme: string): void;
	$unregisterTextContentProvider(handle: number): void;
179
	$onVirtualDocumentChange(uri: UriComponents, value: string): void;
180 181
}

182
export interface MainThreadDocumentsShape extends IDisposable {
J
Johannes Rieken 已提交
183 184 185
	$tryCreateDocument(options?: { language?: string; content?: string; }): Promise<UriComponents>;
	$tryOpenDocument(uri: UriComponents): Promise<void>;
	$trySaveDocument(uri: UriComponents): Promise<boolean>;
186 187
}

188 189
export interface ITextEditorConfigurationUpdate {
	tabSize?: number | 'auto';
A
Alex Dima 已提交
190
	indentSize?: number | 'tabSize';
191 192
	insertSpaces?: boolean | 'auto';
	cursorStyle?: TextEditorCursorStyle;
193
	lineNumbers?: RenderLineNumbersType;
194 195 196 197
}

export interface IResolvedTextEditorConfiguration {
	tabSize: number;
D
David Lechner 已提交
198
	indentSize: number;
199 200
	insertSpaces: boolean;
	cursorStyle: TextEditorCursorStyle;
201
	lineNumbers: RenderLineNumbersType;
202 203 204 205 206 207 208 209 210 211 212 213 214 215 216
}

export enum TextEditorRevealType {
	Default = 0,
	InCenter = 1,
	InCenterIfOutsideViewport = 2,
	AtTop = 3
}

export interface IUndoStopOptions {
	undoStopBefore: boolean;
	undoStopAfter: boolean;
}

export interface IApplyEditsOptions extends IUndoStopOptions {
J
Johannes Rieken 已提交
217
	setEndOfLine?: EndOfLineSequence;
218 219
}

220
export interface ITextDocumentShowOptions {
221
	position?: EditorViewColumn;
222 223
	preserveFocus?: boolean;
	pinned?: boolean;
224
	selection?: IRange;
225 226
}

227
export interface MainThreadTextEditorsShape extends IDisposable {
228
	$tryShowTextDocument(resource: UriComponents, options: ITextDocumentShowOptions): Promise<string | undefined>;
229 230
	$registerTextEditorDecorationType(key: string, options: editorCommon.IDecorationRenderOptions): void;
	$removeTextEditorDecorationType(key: string): void;
J
Johannes Rieken 已提交
231 232 233 234 235 236 237 238
	$tryShowEditor(id: string, position: EditorViewColumn): Promise<void>;
	$tryHideEditor(id: string): Promise<void>;
	$trySetOptions(id: string, options: ITextEditorConfigurationUpdate): Promise<void>;
	$trySetDecorations(id: string, key: string, ranges: editorCommon.IDecorationOptions[]): Promise<void>;
	$trySetDecorationsFast(id: string, key: string, ranges: number[]): Promise<void>;
	$tryRevealRange(id: string, range: IRange, revealType: TextEditorRevealType): Promise<void>;
	$trySetSelections(id: string, selections: ISelection[]): Promise<void>;
	$tryApplyEdits(id: string, modelVersionId: number, edits: ISingleEditOperation[], opts: IApplyEditsOptions): Promise<boolean>;
J
Johannes Rieken 已提交
239
	$tryApplyWorkspaceEdit(workspaceEditDto: IWorkspaceEditDto): Promise<boolean>;
M
Matt Bierner 已提交
240
	$tryInsertSnippet(id: string, template: string, selections: readonly IRange[], opts: IUndoStopOptions): Promise<boolean>;
J
Johannes Rieken 已提交
241
	$getDiffInformation(id: string): Promise<editorCommon.ILineChange[]>;
242 243
}

244
export interface MainThreadTreeViewsShape extends IDisposable {
245
	$registerTreeViewDataProvider(treeViewId: string, options: { showCollapseAll: boolean }): void;
J
Johannes Rieken 已提交
246 247
	$refresh(treeViewId: string, itemsToRefresh?: { [treeItemHandle: string]: ITreeItem }): Promise<void>;
	$reveal(treeViewId: string, treeItem: ITreeItem, parentChain: ITreeItem[], options: IRevealOptions): Promise<void>;
248
	$setMessage(treeViewId: string, message: string | IMarkdownString): void;
249 250
}

251 252 253 254
export interface MainThreadDownloadServiceShape extends IDisposable {
	$download(uri: UriComponents, to: UriComponents): Promise<void>;
}

255
export interface MainThreadErrorsShape extends IDisposable {
256
	$onUnexpectedError(err: any | SerializedError): void;
257 258
}

259
export interface MainThreadConsoleShape extends IDisposable {
260
	$logExtensionHostMessage(msg: IRemoteConsoleLog): void;
261 262
}

A
Alex Dima 已提交
263 264 265 266 267 268 269
export interface MainThreadKeytarShape extends IDisposable {
	$getPassword(service: string, account: string): Promise<string | null>;
	$setPassword(service: string, account: string, password: string): Promise<void>;
	$deletePassword(service: string, account: string): Promise<boolean>;
	$findPassword(service: string): Promise<string | null>;
}

J
Johannes Rieken 已提交
270
export interface IRegExpDto {
271 272 273
	pattern: string;
	flags?: string;
}
J
Johannes Rieken 已提交
274 275 276 277 278
export interface IIndentationRuleDto {
	decreaseIndentPattern: IRegExpDto;
	increaseIndentPattern: IRegExpDto;
	indentNextLinePattern?: IRegExpDto;
	unIndentedLinePattern?: IRegExpDto;
279
}
J
Johannes Rieken 已提交
280 281 282 283
export interface IOnEnterRuleDto {
	beforeText: IRegExpDto;
	afterText?: IRegExpDto;
	oneLineAboveText?: IRegExpDto;
284 285
	action: EnterAction;
}
J
Johannes Rieken 已提交
286
export interface ILanguageConfigurationDto {
287 288
	comments?: CommentRule;
	brackets?: CharacterPair[];
J
Johannes Rieken 已提交
289 290 291
	wordPattern?: IRegExpDto;
	indentationRules?: IIndentationRuleDto;
	onEnterRules?: IOnEnterRuleDto[];
292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309
	__electricCharacterSupport?: {
		brackets?: any;
		docComment?: {
			scope: string;
			open: string;
			lineStart: string;
			close?: string;
		};
	};
	__characterPairSupport?: {
		autoClosingPairs: {
			open: string;
			close: string;
			notIn?: string[];
		}[];
	};
}

310 311
export type GlobPattern = string | { base: string; pattern: string };

J
Johannes Rieken 已提交
312
export interface IDocumentFilterDto {
A
Alex Dima 已提交
313 314 315
	$serialized: true;
	language?: string;
	scheme?: string;
316
	pattern?: string | IRelativePattern;
317
	exclusive?: boolean;
A
Alex Dima 已提交
318 319
}

J
Johannes Rieken 已提交
320
export interface ISignatureHelpProviderMetadataDto {
321 322
	readonly triggerCharacters: readonly string[];
	readonly retriggerCharacters: readonly string[];
323 324
}

325
export interface MainThreadLanguageFeaturesShape extends IDisposable {
326
	$unregister(handle: number): void;
J
Johannes Rieken 已提交
327 328
	$registerDocumentSymbolProvider(handle: number, selector: IDocumentFilterDto[], label: string): void;
	$registerCodeLensSupport(handle: number, selector: IDocumentFilterDto[], eventHandle: number | undefined): void;
329
	$emitCodeLensEvent(eventHandle: number, event?: any): void;
J
Johannes Rieken 已提交
330 331 332 333 334 335 336 337 338 339 340
	$registerDefinitionSupport(handle: number, selector: IDocumentFilterDto[]): void;
	$registerDeclarationSupport(handle: number, selector: IDocumentFilterDto[]): void;
	$registerImplementationSupport(handle: number, selector: IDocumentFilterDto[]): void;
	$registerTypeDefinitionSupport(handle: number, selector: IDocumentFilterDto[]): void;
	$registerHoverProvider(handle: number, selector: IDocumentFilterDto[]): void;
	$registerDocumentHighlightProvider(handle: number, selector: IDocumentFilterDto[]): void;
	$registerReferenceSupport(handle: number, selector: IDocumentFilterDto[]): void;
	$registerQuickFixSupport(handle: number, selector: IDocumentFilterDto[], supportedKinds?: string[]): void;
	$registerDocumentFormattingSupport(handle: number, selector: IDocumentFilterDto[], extensionId: ExtensionIdentifier, displayName: string): void;
	$registerRangeFormattingSupport(handle: number, selector: IDocumentFilterDto[], extensionId: ExtensionIdentifier, displayName: string): void;
	$registerOnTypeFormattingSupport(handle: number, selector: IDocumentFilterDto[], autoFormatTriggerCharacters: string[], extensionId: ExtensionIdentifier): void;
341
	$registerNavigateTypeSupport(handle: number): void;
J
Johannes Rieken 已提交
342 343 344 345 346 347 348 349 350
	$registerRenameSupport(handle: number, selector: IDocumentFilterDto[], supportsResolveInitialValues: boolean): void;
	$registerSuggestSupport(handle: number, selector: IDocumentFilterDto[], triggerCharacters: string[], supportsResolveDetails: boolean, extensionId: ExtensionIdentifier): void;
	$registerSignatureHelpProvider(handle: number, selector: IDocumentFilterDto[], metadata: ISignatureHelpProviderMetadataDto): void;
	$registerDocumentLinkProvider(handle: number, selector: IDocumentFilterDto[], supportsResolve: boolean): void;
	$registerDocumentColorProvider(handle: number, selector: IDocumentFilterDto[]): void;
	$registerFoldingRangeProvider(handle: number, selector: IDocumentFilterDto[]): void;
	$registerSelectionRangeProvider(handle: number, selector: IDocumentFilterDto[]): void;
	$registerCallHierarchyProvider(handle: number, selector: IDocumentFilterDto[]): void;
	$setLanguageConfiguration(handle: number, languageId: string, configuration: ILanguageConfigurationDto): void;
351 352
}

353
export interface MainThreadLanguagesShape extends IDisposable {
J
Johannes Rieken 已提交
354 355
	$getLanguages(): Promise<string[]>;
	$changeLanguage(resource: UriComponents, languageId: string): Promise<void>;
356 357
}

358
export interface MainThreadMessageOptions {
359
	extension?: IExtensionDescription;
360
	modal?: boolean;
361 362
}

363
export interface MainThreadMessageServiceShape extends IDisposable {
364
	$showMessage(severity: Severity, message: string, options: MainThreadMessageOptions, commands: { title: string; isCloseAffordance: boolean; handle: number; }[]): Promise<number | undefined>;
365 366
}

367
export interface MainThreadOutputServiceShape extends IDisposable {
J
Johannes Rieken 已提交
368
	$register(label: string, log: boolean, file?: UriComponents): Promise<string>;
369 370 371 372 373 374
	$append(channelId: string, value: string): Promise<void> | undefined;
	$update(channelId: string): Promise<void> | undefined;
	$clear(channelId: string, till: number): Promise<void> | undefined;
	$reveal(channelId: string, preserveFocus: boolean): Promise<void> | undefined;
	$close(channelId: string): Promise<void> | undefined;
	$dispose(channelId: string): Promise<void> | undefined;
375 376
}

377
export interface MainThreadProgressShape extends IDisposable {
378

B
Benjamin Pasero 已提交
379
	$startProgress(handle: number, options: IProgressOptions, extension?: IExtensionDescription): void;
380 381
	$progressReport(handle: number, message: IProgressStep): void;
	$progressEnd(handle: number): void;
382 383
}

D
Daniel Imms 已提交
384 385 386 387 388 389 390 391 392
export interface TerminalLaunchConfig {
	name?: string;
	shellPath?: string;
	shellArgs?: string[] | string;
	cwd?: string | UriComponents;
	env?: { [key: string]: string | null };
	waitOnExit?: boolean;
	strictEnv?: boolean;
	hideFromUser?: boolean;
393
	isExtensionTerminal?: boolean;
D
Daniel Imms 已提交
394 395
}

396
export interface MainThreadTerminalServiceShape extends IDisposable {
D
Daniel Imms 已提交
397
	$createTerminal(config: TerminalLaunchConfig): Promise<{ id: number, name: string }>;
398 399 400 401
	$dispose(terminalId: number): void;
	$hide(terminalId: number): void;
	$sendText(terminalId: number, text: string, addNewLine: boolean): void;
	$show(terminalId: number, preserveFocus: boolean): void;
402
	/** @deprecated */
D
Daniel Imms 已提交
403
	$registerOnDataListener(terminalId: number): void;
404 405
	$startSendingDataEvents(): void;
	$stopSendingDataEvents(): void;
406

407
	// Process
408 409
	$sendProcessTitle(terminalId: number, title: string): void;
	$sendProcessData(terminalId: number, data: string): void;
D
Daniel Imms 已提交
410
	$sendProcessReady(terminalId: number, pid: number, cwd: string): void;
D
Daniel Imms 已提交
411
	$sendProcessExit(terminalId: number, exitCode: number): void;
412 413
	$sendProcessInitialCwd(terminalId: number, cwd: string): void;
	$sendProcessCwd(terminalId: number, initialCwd: string): void;
414
	$sendOverrideDimensions(terminalId: number, dimensions: ITerminalDimensions | undefined): void;
415
	$sendResolvedLaunchConfig(terminalId: number, shellLaunchConfig: IShellLaunchConfig): void;
D
Daniel Imms 已提交
416 417
}

J
Johannes Rieken 已提交
418
export interface TransferQuickPickItems extends quickInput.IQuickPickItem {
419 420
	handle: number;
}
C
Christof Marti 已提交
421

J
Johannes Rieken 已提交
422
export interface TransferQuickInputButton extends quickInput.IQuickInputButton {
423 424
	handle: number;
}
425 426 427 428 429

export type TransferQuickInput = TransferQuickPick | TransferInputBox;

export interface BaseTransferQuickInput {

430 431
	[key: string]: any;

432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450
	id: number;

	type?: 'quickPick' | 'inputBox';

	enabled?: boolean;

	busy?: boolean;

	visible?: boolean;
}

export interface TransferQuickPick extends BaseTransferQuickInput {

	type?: 'quickPick';

	value?: string;

	placeholder?: string;

C
Christof Marti 已提交
451
	buttons?: TransferQuickInputButton[];
452

C
Christof Marti 已提交
453
	items?: TransferQuickPickItems[];
454

455 456 457 458
	activeItems?: number[];

	selectedItems?: number[];

459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477
	canSelectMany?: boolean;

	ignoreFocusOut?: boolean;

	matchOnDescription?: boolean;

	matchOnDetail?: boolean;
}

export interface TransferInputBox extends BaseTransferQuickInput {

	type?: 'inputBox';

	value?: string;

	placeholder?: string;

	password?: boolean;

C
Christof Marti 已提交
478
	buttons?: TransferQuickInputButton[];
479 480 481 482 483 484

	prompt?: string;

	validationMessage?: string;
}

485 486 487 488 489 490 491 492 493
export interface IInputBoxOptions {
	value?: string;
	valueSelection?: [number, number];
	prompt?: string;
	placeHolder?: string;
	password?: boolean;
	ignoreFocusOut?: boolean;
}

494
export interface MainThreadQuickOpenShape extends IDisposable {
J
Johannes Rieken 已提交
495
	$show(instance: number, options: quickInput.IPickOptions<TransferQuickPickItems>, token: CancellationToken): Promise<number | number[] | undefined>;
J
Johannes Rieken 已提交
496 497
	$setItems(instance: number, items: TransferQuickPickItems[]): Promise<void>;
	$setError(instance: number, error: Error): Promise<void>;
498
	$input(options: IInputBoxOptions | undefined, validateInput: boolean, token: CancellationToken): Promise<string>;
J
Johannes Rieken 已提交
499 500
	$createOrUpdate(params: TransferQuickInput): Promise<void>;
	$dispose(id: number): Promise<void>;
501 502
}

503
export interface MainThreadStatusBarShape extends IDisposable {
B
Benjamin Pasero 已提交
504
	$setEntry(id: number, statusId: string, statusName: string, text: string, tooltip: string, command: string, color: string | ThemeColor, alignment: statusbar.StatusbarAlignment, priority: number | undefined): void;
505
	$dispose(id: number): void;
506 507
}

508
export interface MainThreadStorageShape extends IDisposable {
509
	$getValue<T>(shared: boolean, key: string): Promise<T | undefined>;
J
Johannes Rieken 已提交
510
	$setValue(shared: boolean, key: string, value: object): Promise<void>;
511 512
}

513
export interface MainThreadTelemetryShape extends IDisposable {
514
	$publicLog(eventName: string, data?: any): void;
515
	$publicLog2<E extends ClassifiedEvent<T> = never, T extends GDPRClassification<T> = never>(eventName: string, data?: StrictPropertyCheck<T, E>): void;
516 517
}

518
export interface MainThreadEditorInsetsShape extends IDisposable {
519
	$createEditorInset(handle: number, id: string, uri: UriComponents, line: number, height: number, options: modes.IWebviewOptions, extensionId: ExtensionIdentifier, extensionLocation: UriComponents): Promise<void>;
520 521 522 523 524 525
	$disposeEditorInset(handle: number): void;

	$setHtml(handle: number, value: string): void;
	$setOptions(handle: number, options: modes.IWebviewOptions): void;
	$postMessage(handle: number, value: any): Promise<boolean>;
}
M
Matt Bierner 已提交
526

527 528 529 530 531 532
export interface ExtHostEditorInsetsShape {
	$onDidDispose(handle: number): void;
	$onDidReceiveMessage(handle: number, message: any): void;
}

export type WebviewPanelHandle = string;
533

M
Matt Bierner 已提交
534 535 536 537 538
export interface WebviewPanelShowOptions {
	readonly viewColumn?: EditorViewColumn;
	readonly preserveFocus?: boolean;
}

M
Matt Bierner 已提交
539
export interface MainThreadWebviewsShape extends IDisposable {
540
	$createWebviewPanel(handle: WebviewPanelHandle, viewType: string, title: string, showOptions: WebviewPanelShowOptions, options: modes.IWebviewPanelOptions & modes.IWebviewOptions, extensionId: ExtensionIdentifier, extensionLocation: UriComponents): void;
541
	$disposeWebview(handle: WebviewPanelHandle): void;
M
Matt Bierner 已提交
542
	$reveal(handle: WebviewPanelHandle, showOptions: WebviewPanelShowOptions): void;
543
	$setTitle(handle: WebviewPanelHandle, value: string): void;
544
	$setIconPath(handle: WebviewPanelHandle, value: { light: UriComponents, dark: UriComponents } | undefined): void;
545

546 547 548
	$setHtml(handle: WebviewPanelHandle, value: string): void;
	$setOptions(handle: WebviewPanelHandle, options: modes.IWebviewOptions): void;
	$postMessage(handle: WebviewPanelHandle, value: any): Promise<boolean>;
549 550 551

	$registerSerializer(viewType: string): void;
	$unregisterSerializer(viewType: string): void;
M
Matt Bierner 已提交
552
}
553

M
Matt Bierner 已提交
554 555 556 557 558 559
export interface WebviewPanelViewState {
	readonly active: boolean;
	readonly visible: boolean;
	readonly position: EditorViewColumn;
}

M
Matt Bierner 已提交
560
export interface ExtHostWebviewsShape {
561
	$onMessage(handle: WebviewPanelHandle, message: any): void;
M
Matt Bierner 已提交
562
	$onDidChangeWebviewPanelViewState(handle: WebviewPanelHandle, newState: WebviewPanelViewState): void;
J
Johannes Rieken 已提交
563
	$onDidDisposeWebviewPanel(handle: WebviewPanelHandle): Promise<void>;
564
	$deserializeWebviewPanel(newWebviewHandle: WebviewPanelHandle, viewType: string, title: string, state: any, position: EditorViewColumn, options: modes.IWebviewOptions & modes.IWebviewPanelOptions): Promise<void>;
M
Matt Bierner 已提交
565 566
}

J
Joao Moreno 已提交
567
export interface MainThreadUrlsShape extends IDisposable {
568
	$registerUriHandler(handle: number, extensionId: ExtensionIdentifier): Promise<void>;
J
Johannes Rieken 已提交
569
	$unregisterUriHandler(handle: number): Promise<void>;
J
Joao Moreno 已提交
570 571 572
}

export interface ExtHostUrlsShape {
J
Johannes Rieken 已提交
573
	$handleExternalUri(handle: number, uri: UriComponents): Promise<void>;
M
Matt Bierner 已提交
574 575
}

576 577 578 579
export interface ITextSearchComplete {
	limitHit?: boolean;
}

580
export interface MainThreadWorkspaceShape extends IDisposable {
581
	$startFileSearch(includePattern: string | null, includeFolder: UriComponents | null, excludePatternOrDisregardExcludes: string | false | null, maxResults: number | null, token: CancellationToken): Promise<UriComponents[] | null>;
582
	$startTextSearch(query: search.IPatternInfo, options: ITextQueryBuilderOptions, requestId: number, token: CancellationToken): Promise<ITextSearchComplete>;
583
	$checkExists(folders: UriComponents[], includes: string[], token: CancellationToken): Promise<boolean>;
J
Johannes Rieken 已提交
584 585
	$saveAll(includeUntitled?: boolean): Promise<boolean>;
	$updateWorkspaceFolders(extensionName: string, index: number, deleteCount: number, workspaceFoldersToAdd: { uri: UriComponents, name?: string }[]): Promise<void>;
586
	$resolveProxy(url: string): Promise<string | undefined>;
587
}
588

J
Johannes Rieken 已提交
589 590
export interface IFileChangeDto {
	resource: UriComponents;
J
Johannes Rieken 已提交
591
	type: files.FileChangeType;
J
Johannes Rieken 已提交
592 593
}

594
export interface MainThreadFileSystemShape extends IDisposable {
J
Johannes Rieken 已提交
595
	$registerFileSystemProvider(handle: number, scheme: string, capabilities: files.FileSystemProviderCapabilities): void;
596
	$unregisterProvider(handle: number): void;
J
Johannes Rieken 已提交
597
	$onFileSystemChange(handle: number, resource: IFileChangeDto[]): void;
598 599 600 601

	$stat(uri: UriComponents): Promise<files.IStat>;
	$readdir(resource: UriComponents): Promise<[string, files.FileType][]>;
	$readFile(resource: UriComponents): Promise<VSBuffer>;
602
	$writeFile(resource: UriComponents, content: VSBuffer): Promise<void>;
603 604 605 606
	$rename(resource: UriComponents, target: UriComponents, opts: files.FileOverwriteOptions): Promise<void>;
	$copy(resource: UriComponents, target: UriComponents, opts: files.FileOverwriteOptions): Promise<void>;
	$mkdir(resource: UriComponents): Promise<void>;
	$delete(resource: UriComponents, opts: files.FileDeleteOptions): Promise<void>;
607
}
J
Johannes Rieken 已提交
608

609 610 611 612 613
export interface MainThreadLabelServiceShape extends IDisposable {
	$registerResourceLabelFormatter(handle: number, formatter: ResourceLabelFormatter): void;
	$unregisterResourceLabelFormatter(handle: number): void;
}

614
export interface MainThreadSearchShape extends IDisposable {
615 616
	$registerFileSearchProvider(handle: number, scheme: string): void;
	$registerTextSearchProvider(handle: number, scheme: string): void;
617
	$unregisterProvider(handle: number): void;
618
	$handleFileMatch(handle: number, session: number, data: UriComponents[]): void;
J
Johannes Rieken 已提交
619
	$handleTextMatch(handle: number, session: number, data: search.IRawFileMatch2[]): void;
620
	$handleTelemetry(eventName: string, data: any): void;
621 622
}

623
export interface MainThreadTaskShape extends IDisposable {
J
Johannes Rieken 已提交
624
	$createTaskId(task: tasks.TaskDTO): Promise<string>;
625
	$registerTaskProvider(handle: number, type: string): Promise<void>;
J
Johannes Rieken 已提交
626
	$unregisterTaskProvider(handle: number): Promise<void>;
J
Johannes Rieken 已提交
627 628
	$fetchTasks(filter?: tasks.TaskFilterDTO): Promise<tasks.TaskDTO[]>;
	$executeTask(task: tasks.TaskHandleDTO | tasks.TaskDTO): Promise<tasks.TaskExecutionDTO>;
J
Johannes Rieken 已提交
629
	$terminateTask(id: string): Promise<void>;
J
Johannes Rieken 已提交
630
	$registerTaskSystem(scheme: string, info: tasks.TaskSystemInfoDTO): void;
G
Gabriel DeBacker 已提交
631
	$customExecutionComplete(id: string, result?: number): Promise<void>;
632 633
}

634
export interface MainThreadExtensionServiceShape extends IDisposable {
A
Alex Dima 已提交
635
	$activateExtension(extensionId: ExtensionIdentifier, activationEvent: string | null): Promise<void>;
636
	$onWillActivateExtension(extensionId: ExtensionIdentifier): void;
A
Alex Dima 已提交
637
	$onDidActivateExtension(extensionId: ExtensionIdentifier, startup: boolean, codeLoadingTime: number, activateCallTime: number, activateResolvedTime: number, activationEvent: string | null): void;
638
	$onExtensionActivationError(extensionId: ExtensionIdentifier, error: ExtensionActivationError): Promise<void>;
639
	$onExtensionRuntimeError(extensionId: ExtensionIdentifier, error: SerializedError): void;
A
Alex Dima 已提交
640
	$onExtensionHostExit(code: number): void;
641 642
}

J
Joao Moreno 已提交
643
export interface SCMProviderFeatures {
J
Joao Moreno 已提交
644 645
	hasQuickDiffProvider?: boolean;
	count?: number;
646 647
	commitTemplate?: string;
	acceptInputCommand?: modes.Command;
J
Johannes Rieken 已提交
648
	statusBarCommands?: ICommandDto[];
J
Joao Moreno 已提交
649 650 651 652
}

export interface SCMGroupFeatures {
	hideWhenEmpty?: boolean;
J
Joao Moreno 已提交
653 654
}

J
Joao Moreno 已提交
655
export type SCMRawResource = [
656
	number /*handle*/,
657
	UriComponents /*resourceUri*/,
J
Joao Moreno 已提交
658
	string[] /*icons: light, dark*/,
659
	string /*tooltip*/,
660
	boolean /*strike through*/,
661 662
	boolean /*faded*/,

J
Joao Moreno 已提交
663 664 665
	string | undefined /*source*/,
	string | undefined /*letter*/,
	ThemeColor | null /*color*/
J
Joao Moreno 已提交
666
];
667

668 669 670
export type SCMRawResourceSplice = [
	number /* start */,
	number /* delete count */,
J
Joao 已提交
671 672 673
	SCMRawResource[]
];

674 675 676 677 678
export type SCMRawResourceSplices = [
	number, /*handle*/
	SCMRawResourceSplice[]
];

679
export interface MainThreadSCMShape extends IDisposable {
680
	$registerSourceControl(handle: number, id: string, label: string, rootUri: UriComponents | undefined): void;
681 682
	$updateSourceControl(handle: number, features: SCMProviderFeatures): void;
	$unregisterSourceControl(handle: number): void;
J
Joao Moreno 已提交
683

684 685 686 687
	$registerGroup(sourceControlHandle: number, handle: number, id: string, label: string): void;
	$updateGroup(sourceControlHandle: number, handle: number, features: SCMGroupFeatures): void;
	$updateGroupLabel(sourceControlHandle: number, handle: number, label: string): void;
	$unregisterGroup(sourceControlHandle: number, handle: number): void;
J
Joao Moreno 已提交
688

689
	$spliceResourceStates(sourceControlHandle: number, splices: SCMRawResourceSplices[]): void;
J
Joao 已提交
690

J
Joao Moreno 已提交
691
	$setInputBoxValue(sourceControlHandle: number, value: string): void;
692
	$setInputBoxPlaceholder(sourceControlHandle: number, placeholder: string): void;
693
	$setInputBoxVisibility(sourceControlHandle: number, visible: boolean): void;
694
	$setValidationProviderIsEnabled(sourceControlHandle: number, enabled: boolean): void;
J
Joao Moreno 已提交
695 696
}

697 698
export type DebugSessionUUID = string;

699 700 701 702 703 704 705
export interface IDebugConfiguration {
	type: string;
	name: string;
	request: string;
	[key: string]: any;
}

706
export interface MainThreadDebugServiceShape extends IDisposable {
A
Alex Dima 已提交
707
	$registerDebugTypes(debugTypes: string[]): void;
708
	$sessionCached(sessionID: string): void;
A
Alex Dima 已提交
709
	$acceptDAMessage(handle: number, message: DebugProtocol.ProtocolMessage): void;
710 711
	$acceptDAError(handle: number, name: string, message: string, stack: string | undefined): void;
	$acceptDAExit(handle: number, code: number | undefined, signal: string | undefined): void;
A
Andre Weinand 已提交
712
	$registerDebugConfigurationProvider(type: string, hasProvideMethod: boolean, hasResolveMethod: boolean, hasProvideDaMethod: boolean, handle: number): Promise<void>;
J
Johannes Rieken 已提交
713
	$registerDebugAdapterDescriptorFactory(type: string, handle: number): Promise<void>;
714
	$unregisterDebugConfigurationProvider(handle: number): void;
A
Andre Weinand 已提交
715
	$unregisterDebugAdapterDescriptorFactory(handle: number): void;
716
	$startDebugging(folder: UriComponents | undefined, nameOrConfig: string | IDebugConfiguration, parentSessionID: string | undefined): Promise<boolean>;
J
Johannes Rieken 已提交
717
	$customDebugAdapterRequest(id: DebugSessionUUID, command: string, args: any): Promise<any>;
718 719
	$appendDebugConsole(value: string): void;
	$startBreakpointEvents(): void;
720
	$registerBreakpoints(breakpoints: Array<ISourceMultiBreakpointDto | IFunctionBreakpointDto>): Promise<void>;
J
Johannes Rieken 已提交
721
	$unregisterBreakpoints(breakpointIds: string[], functionBreakpointIds: string[]): Promise<void>;
722 723
}

724 725 726 727
export interface IOpenUriOptions {
	readonly allowTunneling?: boolean;
}

728
export interface MainThreadWindowShape extends IDisposable {
J
Johannes Rieken 已提交
729
	$getWindowVisibility(): Promise<boolean>;
730
	$openUri(uri: UriComponents, options: IOpenUriOptions): Promise<boolean>;
731 732
}

733 734
// -- extension host

735
export interface ExtHostCommandsShape {
J
Johannes Rieken 已提交
736 737
	$executeContributedCommand<T>(id: string, ...args: any[]): Promise<T>;
	$getContributedCommandHandlerDescriptions(): Promise<{ [id: string]: string | ICommandHandlerDescription }>;
738
	$handleDidExecuteCommand(command: ICommandEvent): void;
739 740
}

741
export interface ExtHostConfigurationShape {
742 743
	$initializeConfiguration(data: IConfigurationInitData): void;
	$acceptConfigurationChanged(data: IConfigurationInitData, eventData: IWorkspaceConfigurationChangeEventData): void;
744 745
}

746
export interface ExtHostDiagnosticsShape {
747 748 749

}

750
export interface ExtHostDocumentContentProvidersShape {
M
Matt Bierner 已提交
751
	$provideTextDocumentContent(handle: number, uri: UriComponents): Promise<string | null | undefined>;
752 753
}

754
export interface IModelAddedData {
755
	uri: UriComponents;
756
	versionId: number;
757 758
	lines: string[];
	EOL: string;
759 760 761
	modeId: string;
	isDirty: boolean;
}
762
export interface ExtHostDocumentsShape {
763 764 765 766
	$acceptModelModeChanged(strURL: UriComponents, oldModeId: string, newModeId: string): void;
	$acceptModelSaved(strURL: UriComponents): void;
	$acceptDirtyStateChanged(strURL: UriComponents, isDirty: boolean): void;
	$acceptModelChanged(strURL: UriComponents, e: IModelChangedEvent, isDirty: boolean): void;
767 768
}

769
export interface ExtHostDocumentSaveParticipantShape {
J
Johannes Rieken 已提交
770
	$participateInSave(resource: UriComponents, reason: SaveReason): Promise<boolean[]>;
771 772
}

773 774
export interface ITextEditorAddData {
	id: string;
775
	documentUri: UriComponents;
776
	options: IResolvedTextEditorConfiguration;
A
Alex Dima 已提交
777
	selections: ISelection[];
778
	visibleRanges: IRange[];
A
Alex Dima 已提交
779
	editorPosition: EditorViewColumn | undefined;
780 781
}
export interface ITextEditorPositionData {
782
	[id: string]: EditorViewColumn;
783
}
784 785 786
export interface IEditorPropertiesChangeData {
	options: IResolvedTextEditorConfiguration | null;
	selections: ISelectionChangeEvent | null;
787
	visibleRanges: IRange[] | null;
788 789 790 791 792 793
}
export interface ISelectionChangeEvent {
	selections: Selection[];
	source?: string;
}

794
export interface ExtHostEditorsShape {
795
	$acceptEditorPropertiesChanged(id: string, props: IEditorPropertiesChangeData): void;
796
	$acceptEditorPositionData(data: ITextEditorPositionData): void;
797 798
}

J
Johannes Rieken 已提交
799
export interface IDocumentsAndEditorsDelta {
800
	removedDocuments?: UriComponents[];
J
Johannes Rieken 已提交
801 802 803
	addedDocuments?: IModelAddedData[];
	removedEditors?: string[];
	addedEditors?: ITextEditorAddData[];
A
Alex Dima 已提交
804
	newActiveEditor?: string | null;
J
Johannes Rieken 已提交
805 806
}

807 808
export interface ExtHostDocumentsAndEditorsShape {
	$acceptDocumentsAndEditorsDelta(delta: IDocumentsAndEditorsDelta): void;
J
Johannes Rieken 已提交
809 810
}

811
export interface ExtHostTreeViewsShape {
J
Johannes Rieken 已提交
812
	$getChildren(treeViewId: string, treeItemHandle?: string): Promise<ITreeItem[]>;
813
	$setExpanded(treeViewId: string, treeItemHandle: string, expanded: boolean): void;
814
	$setSelection(treeViewId: string, treeItemHandles: string[]): void;
815
	$setVisible(treeViewId: string, visible: boolean): void;
S
Sandeep Somavarapu 已提交
816 817
}

818
export interface ExtHostWorkspaceShape {
819
	$initializeWorkspace(workspace: IWorkspaceData | null): void;
820
	$acceptWorkspaceData(workspace: IWorkspaceData | null): void;
J
Johannes Rieken 已提交
821
	$handleTextSearchResult(result: search.IRawFileMatch2, requestId: number): void;
822
}
823

824
export interface ExtHostFileSystemShape {
J
Johannes Rieken 已提交
825 826
	$stat(handle: number, resource: UriComponents): Promise<files.IStat>;
	$readdir(handle: number, resource: UriComponents): Promise<[string, files.FileType][]>;
827 828
	$readFile(handle: number, resource: UriComponents): Promise<VSBuffer>;
	$writeFile(handle: number, resource: UriComponents, content: VSBuffer, opts: files.FileWriteOptions): Promise<void>;
J
Johannes Rieken 已提交
829 830
	$rename(handle: number, resource: UriComponents, target: UriComponents, opts: files.FileOverwriteOptions): Promise<void>;
	$copy(handle: number, resource: UriComponents, target: UriComponents, opts: files.FileOverwriteOptions): Promise<void>;
J
Johannes Rieken 已提交
831
	$mkdir(handle: number, resource: UriComponents): Promise<void>;
J
Johannes Rieken 已提交
832 833
	$delete(handle: number, resource: UriComponents, opts: files.FileDeleteOptions): Promise<void>;
	$watch(handle: number, session: number, resource: UriComponents, opts: files.IWatchOptions): void;
834
	$unwatch(handle: number, session: number): void;
J
Johannes Rieken 已提交
835
	$open(handle: number, resource: UriComponents, opts: files.FileOpenOptions): Promise<number>;
J
Johannes Rieken 已提交
836
	$close(handle: number, fd: number): Promise<void>;
837 838
	$read(handle: number, fd: number, pos: number, length: number): Promise<VSBuffer>;
	$write(handle: number, fd: number, pos: number, data: VSBuffer): Promise<number>;
839
}
840

841 842 843 844
export interface ExtHostLabelServiceShape {
	$registerResourceLabelFormatter(formatter: ResourceLabelFormatter): IDisposable;
}

845
export interface ExtHostSearchShape {
J
Johannes Rieken 已提交
846 847
	$provideFileSearchResults(handle: number, session: number, query: search.IRawQuery, token: CancellationToken): Promise<search.ISearchCompleteStats>;
	$provideTextSearchResults(handle: number, session: number, query: search.IRawTextQuery, token: CancellationToken): Promise<search.ISearchCompleteStats>;
J
Johannes Rieken 已提交
848
	$clearCache(cacheKey: string): Promise<void>;
849 850
}

A
Tweaks  
Alex Dima 已提交
851 852 853 854 855 856 857 858 859 860 861
export interface IResolveAuthorityErrorResult {
	type: 'error';
	error: {
		message: string | undefined;
		code: RemoteAuthorityResolverErrorCode;
		detail: any;
	};
}

export interface IResolveAuthorityOKResult {
	type: 'ok';
862
	value: ResolverResult;
A
Tweaks  
Alex Dima 已提交
863 864 865 866
}

export type IResolveAuthorityResult = IResolveAuthorityErrorResult | IResolveAuthorityOKResult;

867
export interface ExtHostExtensionServiceShape {
A
Tweaks  
Alex Dima 已提交
868
	$resolveAuthority(remoteAuthority: string, resolveAttempt: number): Promise<IResolveAuthorityResult>;
869
	$startExtensionHost(enabledExtensionIds: ExtensionIdentifier[]): Promise<void>;
J
Johannes Rieken 已提交
870
	$activateByEvent(activationEvent: string): Promise<void>;
871
	$activate(extensionId: ExtensionIdentifier, activationEvent: string): Promise<boolean>;
872
	$setRemoteEnvironment(env: { [key: string]: string | null }): Promise<void>;
873

874
	$deltaExtensions(toAdd: IExtensionDescription[], toRemove: ExtensionIdentifier[]): Promise<void>;
875 876

	$test_latency(n: number): Promise<number>;
877 878
	$test_up(b: VSBuffer): Promise<number>;
	$test_down(size: number): Promise<VSBuffer>;
879 880 881
}

export interface FileSystemEvents {
J
Johannes Rieken 已提交
882 883 884
	created: UriComponents[];
	changed: UriComponents[];
	deleted: UriComponents[];
885
}
886
export interface ExtHostFileSystemEventServiceShape {
887
	$onFileEvent(events: FileSystemEvents): void;
888
	$onFileRename(oldUri: UriComponents, newUri: UriComponents): void;
J
Johannes Rieken 已提交
889
	$onWillRename(oldUri: UriComponents, newUri: UriComponents): Promise<any>;
890 891
}

J
Johannes Rieken 已提交
892
export interface ObjectIdentifier {
893
	$ident?: number;
J
Johannes Rieken 已提交
894 895 896
}

export namespace ObjectIdentifier {
897
	export const name = '$ident';
J
Johannes Rieken 已提交
898
	export function mixin<T>(obj: T, id: number): T & ObjectIdentifier {
899
		Object.defineProperty(obj, name, { value: id, enumerable: true });
J
Johannes Rieken 已提交
900 901
		return <T & ObjectIdentifier>obj;
	}
902 903
	export function of(obj: any): number {
		return obj[name];
J
Johannes Rieken 已提交
904 905 906
	}
}

907 908
export interface ExtHostHeapServiceShape {
	$onGarbageCollection(ids: number[]): void;
909
}
910
export interface IRawColorInfo {
J
Joao Moreno 已提交
911
	color: [number, number, number, number];
912 913 914
	range: IRange;
}

915 916 917 918 919 920 921 922 923
export class IdObject {
	_id?: number;
	private static _n = 0;
	static mixin<T extends object>(object: T): T & IdObject {
		(<any>object)._id = IdObject._n++;
		return <any>object;
	}
}

J
Johannes Rieken 已提交
924
export interface ISuggestDataDto {
J
Johannes Rieken 已提交
925 926 927 928 929 930 931 932 933 934 935 936 937 938
	a/* label */: string;
	b/* kind */: modes.CompletionItemKind;
	c/* detail */?: string;
	d/* documentation */?: string | IMarkdownString;
	e/* sortText */?: string;
	f/* filterText */?: string;
	g/* preselect */?: boolean;
	h/* insertText */?: string;
	i/* insertTextRules */?: modes.CompletionItemInsertTextRule;
	j/* range */?: IRange;
	k/* commitCharacters */?: string[];
	l/* additionalTextEdits */?: ISingleEditOperation[];
	m/* command */?: modes.Command;
	// not-standard
939
	x?: ChainedCacheId;
J
Johannes Rieken 已提交
940 941
}

J
Johannes Rieken 已提交
942
export interface ISuggestResultDto {
943
	x?: number;
J
Johannes Rieken 已提交
944
	a: IRange;
J
Johannes Rieken 已提交
945
	b: ISuggestDataDto[];
J
Johannes Rieken 已提交
946
	c?: boolean;
947 948
}

J
Johannes Rieken 已提交
949
export interface ISignatureHelpDto {
950 951 952 953 954 955
	id: CacheId;
	signatures: modes.SignatureInformation[];
	activeSignature: number;
	activeParameter: number;
}

J
Johannes Rieken 已提交
956
export interface ISignatureHelpContextDto {
957 958 959
	readonly triggerKind: modes.SignatureHelpTriggerKind;
	readonly triggerCharacter?: string;
	readonly isRetrigger: boolean;
J
Johannes Rieken 已提交
960
	readonly activeSignatureHelp?: ISignatureHelpDto;
961 962
}

J
Johannes Rieken 已提交
963
export interface ILocationDto {
964 965
	uri: UriComponents;
	range: IRange;
966 967
}

J
Johannes Rieken 已提交
968
export interface IDefinitionLinkDto {
J
Johannes Rieken 已提交
969
	originSelectionRange?: IRange;
M
Matt Bierner 已提交
970 971
	uri: UriComponents;
	range: IRange;
J
Johannes Rieken 已提交
972
	targetSelectionRange?: IRange;
M
Matt Bierner 已提交
973 974
}

J
Johannes Rieken 已提交
975
export interface IWorkspaceSymbolDto extends IdObject {
976 977 978
	name: string;
	containerName?: string;
	kind: modes.SymbolKind;
J
Johannes Rieken 已提交
979
	location: ILocationDto;
980 981
}

J
Johannes Rieken 已提交
982 983
export interface IWorkspaceSymbolsDto extends IdObject {
	symbols: IWorkspaceSymbolDto[];
984 985
}

J
Johannes Rieken 已提交
986
export interface IResourceFileEditDto {
M
Matt Bierner 已提交
987 988
	oldUri?: UriComponents;
	newUri?: UriComponents;
989 990 991 992 993 994
	options?: {
		overwrite?: boolean;
		ignoreIfExists?: boolean;
		ignoreIfNotExists?: boolean;
		recursive?: boolean;
	};
995 996
}

J
Johannes Rieken 已提交
997
export interface IResourceTextEditDto {
998
	resource: UriComponents;
999 1000
	modelVersionId?: number;
	edits: modes.TextEdit[];
1001 1002
}

J
Johannes Rieken 已提交
1003 1004
export interface IWorkspaceEditDto {
	edits: Array<IResourceFileEditDto | IResourceTextEditDto>;
1005 1006

	// todo@joh reject should go into rename
1007 1008 1009
	rejectReason?: string;
}

J
Johannes Rieken 已提交
1010
export function reviveWorkspaceEditDto(data: IWorkspaceEditDto | undefined): modes.WorkspaceEdit {
1011 1012
	if (data && data.edits) {
		for (const edit of data.edits) {
J
Johannes Rieken 已提交
1013 1014
			if (typeof (<IResourceTextEditDto>edit).resource === 'object') {
				(<IResourceTextEditDto>edit).resource = URI.revive((<IResourceTextEditDto>edit).resource);
1015
			} else {
J
Johannes Rieken 已提交
1016 1017
				(<IResourceFileEditDto>edit).newUri = URI.revive((<IResourceFileEditDto>edit).newUri);
				(<IResourceFileEditDto>edit).oldUri = URI.revive((<IResourceFileEditDto>edit).oldUri);
1018 1019 1020 1021 1022 1023
			}
		}
	}
	return <modes.WorkspaceEdit>data;
}

J
Johannes Rieken 已提交
1024
export type ICommandDto = ObjectIdentifier & modes.Command;
1025

J
Johannes Rieken 已提交
1026
export interface ICodeActionDto {
1027
	title: string;
J
Johannes Rieken 已提交
1028
	edit?: IWorkspaceEditDto;
1029
	diagnostics?: IMarkerData[];
J
Johannes Rieken 已提交
1030
	command?: ICommandDto;
J
Johannes Rieken 已提交
1031
	kind?: string;
1032
	isPreferred?: boolean;
1033
}
1034

J
Johannes Rieken 已提交
1035
export interface ICodeActionListDto {
1036
	cacheId: number;
J
Johannes Rieken 已提交
1037
	actions: ReadonlyArray<ICodeActionDto>;
1038 1039
}

1040 1041 1042
export type CacheId = number;
export type ChainedCacheId = [CacheId, CacheId];

J
Johannes Rieken 已提交
1043
export interface ILinksListDto {
1044
	id?: CacheId;
J
Johannes Rieken 已提交
1045
	links: ILinkDto[];
1046 1047
}

J
Johannes Rieken 已提交
1048
export interface ILinkDto {
1049
	cacheId?: ChainedCacheId;
M
Martin Aeschlimann 已提交
1050 1051
	range: IRange;
	url?: string | UriComponents;
1052
	tooltip?: string;
M
Martin Aeschlimann 已提交
1053
}
1054

J
Johannes Rieken 已提交
1055
export interface ICodeLensListDto {
1056
	cacheId?: number;
J
Johannes Rieken 已提交
1057
	lenses: ICodeLensDto[];
1058 1059
}

J
Johannes Rieken 已提交
1060
export interface ICodeLensDto {
1061
	cacheId?: ChainedCacheId;
1062
	range: IRange;
J
Johannes Rieken 已提交
1063
	command?: ICommandDto;
1064
}
1065

J
Johannes Rieken 已提交
1066
export interface ICallHierarchyDto {
1067 1068 1069 1070 1071 1072 1073 1074 1075
	_id: number;
	kind: modes.SymbolKind;
	name: string;
	detail?: string;
	uri: UriComponents;
	range: IRange;
	selectionRange: IRange;
}

1076
export interface ExtHostLanguageFeaturesShape {
1077
	$provideDocumentSymbols(handle: number, resource: UriComponents, token: CancellationToken): Promise<modes.DocumentSymbol[] | undefined>;
J
Johannes Rieken 已提交
1078 1079
	$provideCodeLenses(handle: number, resource: UriComponents, token: CancellationToken): Promise<ICodeLensListDto | undefined>;
	$resolveCodeLens(handle: number, symbol: ICodeLensDto, token: CancellationToken): Promise<ICodeLensDto | undefined>;
1080
	$releaseCodeLenses(handle: number, id: number): void;
J
Johannes Rieken 已提交
1081 1082 1083 1084
	$provideDefinition(handle: number, resource: UriComponents, position: IPosition, token: CancellationToken): Promise<IDefinitionLinkDto[]>;
	$provideDeclaration(handle: number, resource: UriComponents, position: IPosition, token: CancellationToken): Promise<IDefinitionLinkDto[]>;
	$provideImplementation(handle: number, resource: UriComponents, position: IPosition, token: CancellationToken): Promise<IDefinitionLinkDto[]>;
	$provideTypeDefinition(handle: number, resource: UriComponents, position: IPosition, token: CancellationToken): Promise<IDefinitionLinkDto[]>;
1085 1086
	$provideHover(handle: number, resource: UriComponents, position: IPosition, token: CancellationToken): Promise<modes.Hover | undefined>;
	$provideDocumentHighlights(handle: number, resource: UriComponents, position: IPosition, token: CancellationToken): Promise<modes.DocumentHighlight[] | undefined>;
J
Johannes Rieken 已提交
1087 1088
	$provideReferences(handle: number, resource: UriComponents, position: IPosition, context: modes.ReferenceContext, token: CancellationToken): Promise<ILocationDto[] | undefined>;
	$provideCodeActions(handle: number, resource: UriComponents, rangeOrSelection: IRange | ISelection, context: modes.CodeActionContext, token: CancellationToken): Promise<ICodeActionListDto | undefined>;
1089
	$releaseCodeActions(handle: number, cacheId: number): void;
1090 1091 1092
	$provideDocumentFormattingEdits(handle: number, resource: UriComponents, options: modes.FormattingOptions, token: CancellationToken): Promise<ISingleEditOperation[] | undefined>;
	$provideDocumentRangeFormattingEdits(handle: number, resource: UriComponents, range: IRange, options: modes.FormattingOptions, token: CancellationToken): Promise<ISingleEditOperation[] | undefined>;
	$provideOnTypeFormattingEdits(handle: number, resource: UriComponents, position: IPosition, ch: string, options: modes.FormattingOptions, token: CancellationToken): Promise<ISingleEditOperation[] | undefined>;
J
Johannes Rieken 已提交
1093 1094
	$provideWorkspaceSymbols(handle: number, search: string, token: CancellationToken): Promise<IWorkspaceSymbolsDto>;
	$resolveWorkspaceSymbol(handle: number, symbol: IWorkspaceSymbolDto, token: CancellationToken): Promise<IWorkspaceSymbolDto | undefined>;
1095
	$releaseWorkspaceSymbols(handle: number, id: number): void;
J
Johannes Rieken 已提交
1096
	$provideRenameEdits(handle: number, resource: UriComponents, position: IPosition, newName: string, token: CancellationToken): Promise<IWorkspaceEditDto | undefined>;
1097
	$resolveRenameLocation(handle: number, resource: UriComponents, position: IPosition, token: CancellationToken): Promise<modes.RenameLocation | undefined>;
J
Johannes Rieken 已提交
1098 1099
	$provideCompletionItems(handle: number, resource: UriComponents, position: IPosition, context: modes.CompletionContext, token: CancellationToken): Promise<ISuggestResultDto | undefined>;
	$resolveCompletionItem(handle: number, resource: UriComponents, position: IPosition, id: ChainedCacheId, token: CancellationToken): Promise<ISuggestDataDto | undefined>;
1100
	$releaseCompletionItems(handle: number, id: number): void;
J
Johannes Rieken 已提交
1101
	$provideSignatureHelp(handle: number, resource: UriComponents, position: IPosition, context: modes.SignatureHelpContext, token: CancellationToken): Promise<ISignatureHelpDto | undefined>;
1102
	$releaseSignatureHelp(handle: number, id: number): void;
J
Johannes Rieken 已提交
1103 1104
	$provideDocumentLinks(handle: number, resource: UriComponents, token: CancellationToken): Promise<ILinksListDto | undefined>;
	$resolveDocumentLink(handle: number, id: ChainedCacheId, token: CancellationToken): Promise<ILinkDto | undefined>;
1105
	$releaseDocumentLinks(handle: number, id: number): void;
J
Johannes Rieken 已提交
1106
	$provideDocumentColors(handle: number, resource: UriComponents, token: CancellationToken): Promise<IRawColorInfo[]>;
M
Matt Bierner 已提交
1107 1108
	$provideColorPresentations(handle: number, resource: UriComponents, colorInfo: IRawColorInfo, token: CancellationToken): Promise<modes.IColorPresentation[] | undefined>;
	$provideFoldingRanges(handle: number, resource: UriComponents, context: modes.FoldingContext, token: CancellationToken): Promise<modes.FoldingRange[] | undefined>;
1109
	$provideSelectionRanges(handle: number, resource: UriComponents, positions: IPosition[], token: CancellationToken): Promise<modes.SelectionRange[][]>;
J
Johannes Rieken 已提交
1110 1111
	$provideCallHierarchyItem(handle: number, resource: UriComponents, position: IPosition, token: CancellationToken): Promise<ICallHierarchyDto | undefined>;
	$resolveCallHierarchyItem(handle: number, item: callHierarchy.CallHierarchyItem, direction: callHierarchy.CallHierarchyDirection, token: CancellationToken): Promise<[ICallHierarchyDto, modes.Location[]][]>;
1112 1113
}

1114 1115
export interface ExtHostQuickOpenShape {
	$onItemSelected(handle: number): void;
M
Matt Bierner 已提交
1116
	$validateInput(input: string): Promise<string | null | undefined>;
1117 1118 1119
	$onDidChangeActive(sessionId: number, handles: number[]): void;
	$onDidChangeSelection(sessionId: number, handles: number[]): void;
	$onDidAccept(sessionId: number): void;
1120
	$onDidChangeValue(sessionId: number, value: string): void;
C
Christof Marti 已提交
1121
	$onDidTriggerButton(sessionId: number, handle: number): void;
1122
	$onDidHide(sessionId: number): void;
1123 1124
}

J
Johannes Rieken 已提交
1125
export interface IShellLaunchConfigDto {
1126 1127 1128
	name?: string;
	executable?: string;
	args?: string[] | string;
1129
	cwd?: string | UriComponents;
1130
	env?: { [key: string]: string | null };
1131 1132
}

D
Daniel Imms 已提交
1133 1134 1135 1136 1137
export interface IShellDefinitionDto {
	label: string;
	path: string;
}

D
Daniel Imms 已提交
1138 1139 1140 1141 1142
export interface IShellAndArgsDto {
	shell: string;
	args: string[] | string | undefined;
}

1143 1144 1145 1146 1147
export interface ITerminalDimensionsDto {
	columns: number;
	rows: number;
}

1148 1149
export interface ExtHostTerminalServiceShape {
	$acceptTerminalClosed(id: number): void;
1150
	$acceptTerminalOpened(id: number, name: string): void;
1151
	$acceptActiveTerminalChanged(id: number | null): void;
1152
	$acceptTerminalProcessId(id: number, processId: number): void;
1153
	/** @deprecated */
A
Alex Dima 已提交
1154
	$acceptTerminalProcessData(id: number, data: string): void;
1155
	$acceptTerminalProcessData2(id: number, data: string): void;
1156
	$acceptTerminalTitleChange(id: number, name: string): void;
1157
	$acceptTerminalDimensions(id: number, cols: number, rows: number): void;
1158
	$acceptTerminalMaximumDimensions(id: number, cols: number, rows: number): void;
J
Johannes Rieken 已提交
1159
	$spawnExtHostProcess(id: number, shellLaunchConfig: IShellLaunchConfigDto, activeWorkspaceRootUri: UriComponents, cols: number, rows: number, isWorkspaceShellAllowed: boolean): void;
1160
	$startExtensionTerminal(id: number, initialDimensions: ITerminalDimensionsDto | undefined): void;
D
Daniel Imms 已提交
1161 1162
	$acceptProcessInput(id: number, data: string): void;
	$acceptProcessResize(id: number, cols: number, rows: number): void;
1163
	$acceptProcessShutdown(id: number, immediate: boolean): void;
1164 1165
	$acceptProcessRequestInitialCwd(id: number): void;
	$acceptProcessRequestCwd(id: number): void;
1166
	$acceptProcessRequestLatency(id: number): number;
1167
	$acceptWorkspacePermissionsChanged(isAllowed: boolean): void;
1168
	$requestAvailableShells(): Promise<IShellDefinitionDto[]>;
1169
	$requestDefaultShellAndArgs(useAutomationShell: boolean): Promise<IShellAndArgsDto>;
1170 1171
}

1172
export interface ExtHostSCMShape {
M
Matt Bierner 已提交
1173
	$provideOriginalResource(sourceControlHandle: number, uri: UriComponents, token: CancellationToken): Promise<UriComponents | null>;
A
Alex Dima 已提交
1174
	$onInputBoxValueChange(sourceControlHandle: number, value: string): void;
J
Johannes Rieken 已提交
1175 1176 1177
	$executeResourceCommand(sourceControlHandle: number, groupHandle: number, handle: number): Promise<void>;
	$validateInput(sourceControlHandle: number, value: string, cursorPosition: number): Promise<[string, number] | undefined>;
	$setSelectedSourceControls(selectedSourceControlHandles: number[]): Promise<void>;
J
Joao Moreno 已提交
1178 1179
}

1180
export interface ExtHostTaskShape {
J
Johannes Rieken 已提交
1181
	$provideTasks(handle: number, validTypes: { [key: string]: boolean; }): Thenable<tasks.TaskSetDTO>;
1182
	$resolveTask(handle: number, taskDTO: tasks.TaskDTO): Thenable<tasks.TaskDTO | undefined>;
J
Johannes Rieken 已提交
1183 1184 1185 1186
	$onDidStartTask(execution: tasks.TaskExecutionDTO, terminalId: number): void;
	$onDidStartTaskProcess(value: tasks.TaskProcessStartedDTO): void;
	$onDidEndTaskProcess(value: tasks.TaskProcessEndedDTO): void;
	$OnDidEndTask(execution: tasks.TaskExecutionDTO): void;
J
Johannes Rieken 已提交
1187
	$resolveVariables(workspaceFolder: UriComponents, toResolve: { process?: { name: string; cwd?: string }, variables: string[] }): Promise<{ process?: string; variables: { [key: string]: string } }>;
1188 1189
}

1190 1191
export interface IBreakpointDto {
	type: string;
1192
	id?: string;
1193 1194 1195
	enabled: boolean;
	condition?: string;
	hitCondition?: string;
1196 1197 1198 1199 1200
	logMessage?: string;
}

export interface IFunctionBreakpointDto extends IBreakpointDto {
	type: 'function';
1201
	functionName: string;
1202 1203
}

1204
export interface ISourceBreakpointDto extends IBreakpointDto {
1205
	type: 'source';
1206
	uri: UriComponents;
1207 1208
	line: number;
	character: number;
1209 1210
}

1211
export interface IBreakpointsDeltaDto {
1212
	added?: Array<ISourceBreakpointDto | IFunctionBreakpointDto>;
1213
	removed?: string[];
1214
	changed?: Array<ISourceBreakpointDto | IFunctionBreakpointDto>;
1215 1216
}

1217 1218 1219 1220
export interface ISourceMultiBreakpointDto {
	type: 'sourceMulti';
	uri: UriComponents;
	lines: {
1221
		id: string;
1222 1223 1224
		enabled: boolean;
		condition?: string;
		hitCondition?: string;
1225
		logMessage?: string;
1226 1227 1228
		line: number;
		character: number;
	}[];
1229 1230
}

A
Andre Weinand 已提交
1231
export interface IDebugSessionFullDto {
1232 1233 1234
	id: DebugSessionUUID;
	type: string;
	name: string;
1235
	folderUri: UriComponents | undefined;
A
Andre Weinand 已提交
1236
	configuration: IConfig;
1237 1238
}

A
Andre Weinand 已提交
1239 1240
export type IDebugSessionDto = IDebugSessionFullDto | DebugSessionUUID;

1241
export interface ExtHostDebugServiceShape {
J
Johannes Rieken 已提交
1242
	$substituteVariables(folder: UriComponents | undefined, config: IConfig): Promise<IConfig>;
1243
	$runInTerminal(args: DebugProtocol.RunInTerminalRequestArguments): Promise<number | undefined>;
J
Johannes Rieken 已提交
1244 1245
	$startDASession(handle: number, session: IDebugSessionDto): Promise<void>;
	$stopDASession(handle: number): Promise<void>;
1246
	$sendDAMessage(handle: number, message: DebugProtocol.ProtocolMessage): void;
1247 1248
	$resolveDebugConfiguration(handle: number, folder: UriComponents | undefined, debugConfiguration: IConfig, token: CancellationToken): Promise<IConfig | null | undefined>;
	$provideDebugConfigurations(handle: number, folder: UriComponents | undefined, token: CancellationToken): Promise<IConfig[]>;
J
Johannes Rieken 已提交
1249 1250
	$legacyDebugAdapterExecutable(handle: number, folderUri: UriComponents | undefined): Promise<IAdapterDescriptor>; // TODO@AW legacy
	$provideDebugAdapter(handle: number, session: IDebugSessionDto): Promise<IAdapterDescriptor>;
1251 1252
	$acceptDebugSessionStarted(session: IDebugSessionDto): void;
	$acceptDebugSessionTerminated(session: IDebugSessionDto): void;
1253
	$acceptDebugSessionActiveChanged(session: IDebugSessionDto | undefined): void;
1254 1255
	$acceptDebugSessionCustomEvent(session: IDebugSessionDto, event: any): void;
	$acceptBreakpointsDelta(delta: IBreakpointsDeltaDto): void;
1256 1257
}

1258

1259 1260 1261 1262 1263 1264
export interface DecorationRequest {
	readonly id: number;
	readonly handle: number;
	readonly uri: UriComponents;
}

1265
export type DecorationData = [number, boolean, string, string, ThemeColor, string];
1266
export type DecorationReply = { [id: number]: DecorationData };
1267 1268

export interface ExtHostDecorationsShape {
J
Johannes Rieken 已提交
1269
	$provideDecorations(requests: DecorationRequest[], token: CancellationToken): Promise<DecorationReply>;
1270 1271
}

1272 1273
export interface ExtHostWindowShape {
	$onDidChangeWindowFocus(value: boolean): void;
1274 1275
}

S
Sandeep Somavarapu 已提交
1276
export interface ExtHostLogServiceShape {
A
Alex Dima 已提交
1277
	$setLevel(level: LogLevel): void;
S
Sandeep Somavarapu 已提交
1278 1279
}

1280 1281 1282 1283
export interface ExtHostOutputServiceShape {
	$setVisibleChannel(channelId: string | null): void;
}

1284 1285 1286 1287
export interface ExtHostProgressShape {
	$acceptProgressCanceled(handle: number): void;
}

M
Matt Bierner 已提交
1288
export interface ExtHostCommentsShape {
P
Peng Lyu 已提交
1289
	$createCommentThreadTemplate(commentControllerHandle: number, uriComponents: UriComponents, range: IRange): void;
1290
	$updateCommentThreadTemplate(commentControllerHandle: number, threadHandle: number, range: IRange): Promise<void>;
1291
	$deleteCommentThread(commentControllerHandle: number, commentThreadHandle: number): void;
P
Peng Lyu 已提交
1292
	$provideCommentingRanges(commentControllerHandle: number, uriComponents: UriComponents, token: CancellationToken): Promise<IRange[] | undefined>;
P
Peng Lyu 已提交
1293
	$toggleReaction(commentControllerHandle: number, threadHandle: number, uri: UriComponents, comment: modes.Comment, reaction: modes.CommentReaction): Promise<void>;
M
Matt Bierner 已提交
1294 1295
}

1296
export interface ExtHostStorageShape {
1297
	$acceptValue(shared: boolean, key: string, value: object | undefined): void;
1298 1299
}

1300 1301 1302
// --- proxy identifiers

export const MainContext = {
1303 1304
	MainThreadClipboard: createMainId<MainThreadClipboardShape>('MainThreadClipboard'),
	MainThreadCommands: createMainId<MainThreadCommandsShape>('MainThreadCommands'),
M
Matt Bierner 已提交
1305
	MainThreadComments: createMainId<MainThreadCommentsShape>('MainThreadComments'),
1306
	MainThreadConfiguration: createMainId<MainThreadConfigurationShape>('MainThreadConfiguration'),
1307
	MainThreadConsole: createMainId<MainThreadConsoleShape>('MainThreadConsole'),
1308
	MainThreadDebugService: createMainId<MainThreadDebugServiceShape>('MainThreadDebugService'),
1309 1310 1311 1312
	MainThreadDecorations: createMainId<MainThreadDecorationsShape>('MainThreadDecorations'),
	MainThreadDiagnostics: createMainId<MainThreadDiagnosticsShape>('MainThreadDiagnostics'),
	MainThreadDialogs: createMainId<MainThreadDiaglogsShape>('MainThreadDiaglogs'),
	MainThreadDocuments: createMainId<MainThreadDocumentsShape>('MainThreadDocuments'),
1313
	MainThreadDocumentContentProviders: createMainId<MainThreadDocumentContentProvidersShape>('MainThreadDocumentContentProviders'),
1314
	MainThreadTextEditors: createMainId<MainThreadTextEditorsShape>('MainThreadTextEditors'),
1315
	MainThreadEditorInsets: createMainId<MainThreadEditorInsetsShape>('MainThreadEditorInsets'),
1316 1317
	MainThreadErrors: createMainId<MainThreadErrorsShape>('MainThreadErrors'),
	MainThreadTreeViews: createMainId<MainThreadTreeViewsShape>('MainThreadTreeViews'),
1318
	MainThreadDownloadService: createMainId<MainThreadDownloadServiceShape>('MainThreadDownloadService'),
A
Alex Dima 已提交
1319
	MainThreadKeytar: createMainId<MainThreadKeytarShape>('MainThreadKeytar'),
1320
	MainThreadLanguageFeatures: createMainId<MainThreadLanguageFeaturesShape>('MainThreadLanguageFeatures'),
1321
	MainThreadLanguages: createMainId<MainThreadLanguagesShape>('MainThreadLanguages'),
1322
	MainThreadMessageService: createMainId<MainThreadMessageServiceShape>('MainThreadMessageService'),
1323 1324
	MainThreadOutputService: createMainId<MainThreadOutputServiceShape>('MainThreadOutputService'),
	MainThreadProgress: createMainId<MainThreadProgressShape>('MainThreadProgress'),
1325
	MainThreadQuickOpen: createMainId<MainThreadQuickOpenShape>('MainThreadQuickOpen'),
1326
	MainThreadStatusBar: createMainId<MainThreadStatusBarShape>('MainThreadStatusBar'),
1327
	MainThreadStorage: createMainId<MainThreadStorageShape>('MainThreadStorage'),
1328
	MainThreadTelemetry: createMainId<MainThreadTelemetryShape>('MainThreadTelemetry'),
1329
	MainThreadTerminalService: createMainId<MainThreadTerminalServiceShape>('MainThreadTerminalService'),
M
Matt Bierner 已提交
1330
	MainThreadWebviews: createMainId<MainThreadWebviewsShape>('MainThreadWebviews'),
J
Joao Moreno 已提交
1331
	MainThreadUrls: createMainId<MainThreadUrlsShape>('MainThreadUrls'),
1332
	MainThreadWorkspace: createMainId<MainThreadWorkspaceShape>('MainThreadWorkspace'),
1333
	MainThreadFileSystem: createMainId<MainThreadFileSystemShape>('MainThreadFileSystem'),
1334
	MainThreadExtensionService: createMainId<MainThreadExtensionServiceShape>('MainThreadExtensionService'),
J
Joao Moreno 已提交
1335
	MainThreadSCM: createMainId<MainThreadSCMShape>('MainThreadSCM'),
1336
	MainThreadSearch: createMainId<MainThreadSearchShape>('MainThreadSearch'),
1337
	MainThreadTask: createMainId<MainThreadTaskShape>('MainThreadTask'),
1338
	MainThreadWindow: createMainId<MainThreadWindowShape>('MainThreadWindow'),
1339
	MainThreadLabelService: createMainId<MainThreadLabelServiceShape>('MainThreadLabelService')
1340 1341 1342
};

export const ExtHostContext = {
1343
	ExtHostCommands: createExtId<ExtHostCommandsShape>('ExtHostCommands'),
1344
	ExtHostConfiguration: createExtId<ExtHostConfigurationShape>('ExtHostConfiguration'),
1345
	ExtHostDiagnostics: createExtId<ExtHostDiagnosticsShape>('ExtHostDiagnostics'),
1346
	ExtHostDebugService: createExtId<ExtHostDebugServiceShape>('ExtHostDebugService'),
J
Johannes Rieken 已提交
1347
	ExtHostDecorations: createExtId<ExtHostDecorationsShape>('ExtHostDecorations'),
1348
	ExtHostDocumentsAndEditors: createExtId<ExtHostDocumentsAndEditorsShape>('ExtHostDocumentsAndEditors'),
1349
	ExtHostDocuments: createExtId<ExtHostDocumentsShape>('ExtHostDocuments'),
J
Johannes Rieken 已提交
1350
	ExtHostDocumentContentProviders: createExtId<ExtHostDocumentContentProvidersShape>('ExtHostDocumentContentProviders'),
J
Johannes Rieken 已提交
1351
	ExtHostDocumentSaveParticipant: createExtId<ExtHostDocumentSaveParticipantShape>('ExtHostDocumentSaveParticipant'),
J
Johannes Rieken 已提交
1352
	ExtHostEditors: createExtId<ExtHostEditorsShape>('ExtHostEditors'),
1353
	ExtHostTreeViews: createExtId<ExtHostTreeViewsShape>('ExtHostTreeViews'),
J
Johannes Rieken 已提交
1354
	ExtHostFileSystem: createExtId<ExtHostFileSystemShape>('ExtHostFileSystem'),
J
Johannes Rieken 已提交
1355
	ExtHostFileSystemEventService: createExtId<ExtHostFileSystemEventServiceShape>('ExtHostFileSystemEventService'),
1356
	ExtHostLanguageFeatures: createExtId<ExtHostLanguageFeaturesShape>('ExtHostLanguageFeatures'),
1357 1358
	ExtHostQuickOpen: createExtId<ExtHostQuickOpenShape>('ExtHostQuickOpen'),
	ExtHostExtensionService: createExtId<ExtHostExtensionServiceShape>('ExtHostExtensionService'),
1359
	ExtHostLogService: createExtId<ExtHostLogServiceShape>('ExtHostLogService'),
1360
	ExtHostTerminalService: createExtId<ExtHostTerminalServiceShape>('ExtHostTerminalService'),
J
Joao Moreno 已提交
1361
	ExtHostSCM: createExtId<ExtHostSCMShape>('ExtHostSCM'),
1362
	ExtHostSearch: createExtId<ExtHostSearchShape>('ExtHostSearch'),
1363
	ExtHostTask: createExtId<ExtHostTaskShape>('ExtHostTask'),
1364
	ExtHostWorkspace: createExtId<ExtHostWorkspaceShape>('ExtHostWorkspace'),
1365
	ExtHostWindow: createExtId<ExtHostWindowShape>('ExtHostWindow'),
1366
	ExtHostWebviews: createExtId<ExtHostWebviewsShape>('ExtHostWebviews'),
1367
	ExtHostEditorInsets: createExtId<ExtHostEditorInsetsShape>('ExtHostEditorInsets'),
M
Matt Bierner 已提交
1368
	ExtHostProgress: createMainId<ExtHostProgressShape>('ExtHostProgress'),
1369
	ExtHostComments: createMainId<ExtHostCommentsShape>('ExtHostComments'),
1370
	ExtHostStorage: createMainId<ExtHostStorageShape>('ExtHostStorage'),
1371 1372
	ExtHostUrls: createExtId<ExtHostUrlsShape>('ExtHostUrls'),
	ExtHostOutputService: createMainId<ExtHostOutputServiceShape>('ExtHostOutputService'),
1373
	ExtHosLabelService: createMainId<ExtHostLabelServiceShape>('ExtHostLabelService')
1374
};