extHost.protocol.ts 57.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.
 *--------------------------------------------------------------------------------------------*/

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

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

63
export interface IStaticWorkspaceData {
64
	id: string;
65
	name: string;
A
Alex Dima 已提交
66
	configuration?: UriComponents | null;
67 68
}

69 70 71 72
export interface IWorkspaceData extends IStaticWorkspaceData {
	folders: { uri: UriComponents, name: string, index: number }[];
}

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

S
Sandeep Somavarapu 已提交
89
export interface IConfigurationInitData extends IConfigurationData {
S
Sandeep Somavarapu 已提交
90
	configurationScopes: { [key: string]: ConfigurationScope };
S
Sandeep Somavarapu 已提交
91 92
}

93
export interface IWorkspaceConfigurationChangeEventData {
S
Sandeep Somavarapu 已提交
94 95
	changedConfiguration: IConfigurationModel;
	changedConfigurationByResource: { [folder: string]: IConfigurationModel };
96 97
}

A
Alex Dima 已提交
98
export interface IExtHostContext extends IRPCProtocol {
A
Alex Dima 已提交
99
	remoteAuthority: string;
100 101
}

A
Alex Dima 已提交
102
export interface IMainContext extends IRPCProtocol {
103 104
}

105 106
// --- main thread

107 108 109 110 111
export interface MainThreadClipboardShape extends IDisposable {
	$readText(): Promise<string>;
	$writeText(value: string): Promise<void>;
}

112
export interface MainThreadCommandsShape extends IDisposable {
113 114
	$registerCommand(id: string): void;
	$unregisterCommand(id: string): void;
115
	$executeCommand<T>(id: string, args: any[]): Promise<T | undefined>;
J
Johannes Rieken 已提交
116
	$getCommands(): Promise<string[]>;
117 118
}

R
rebornix 已提交
119 120 121 122
export interface CommentProviderFeatures {
	startDraftLabel?: string;
	deleteDraftLabel?: string;
	finishDraftLabel?: string;
P
Peng Lyu 已提交
123
	reactionGroup?: modes.CommentReaction[];
R
rebornix 已提交
124 125
}

M
Matt Bierner 已提交
126
export interface MainThreadCommentsShape extends IDisposable {
P
Peng Lyu 已提交
127
	$registerCommentController(handle: number, id: string, label: string): void;
128
	$unregisterCommentController(handle: number): void;
P
Peng Lyu 已提交
129
	$updateCommentControllerFeatures(handle: number, features: CommentProviderFeatures): void;
130 131
	$createCommentThread(handle: number, commentThreadHandle: number, threadId: string, resource: UriComponents, range: IRange): modes.CommentThread2 | undefined;
	$updateCommentThread(handle: number, commentThreadHandle: number, threadId: string, resource: UriComponents, range: IRange, label: string, comments: modes.Comment[], acceptInputCommand: modes.Command | undefined, additionalCommands: modes.Command[], deleteCommand: modes.Command | undefined, collapseState: modes.CommentThreadCollapsibleState): void;
P
Peng Lyu 已提交
132
	$deleteCommentThread(handle: number, commentThreadHandle: number): void;
P
Peng Lyu 已提交
133
	$setInputValue(handle: number, input: string): void;
R
rebornix 已提交
134
	$registerDocumentCommentProvider(handle: number, features: CommentProviderFeatures): void;
135
	$unregisterDocumentCommentProvider(handle: number): void;
136
	$registerWorkspaceCommentProvider(handle: number, extensionId: ExtensionIdentifier): void;
137
	$unregisterWorkspaceCommentProvider(handle: number): void;
138
	$onDidCommentThreadsChange(handle: number, event: modes.CommentThreadChangedEvent): void;
M
Matt Bierner 已提交
139 140
}

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

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

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

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

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

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

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

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

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

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

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 已提交
218
	setEndOfLine?: EndOfLineSequence;
219 220
}

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

228
export interface MainThreadTextEditorsShape extends IDisposable {
229
	$tryShowTextDocument(resource: UriComponents, options: ITextDocumentShowOptions): Promise<string | undefined>;
230 231
	$registerTextEditorDecorationType(key: string, options: editorCommon.IDecorationRenderOptions): void;
	$removeTextEditorDecorationType(key: string): void;
J
Johannes Rieken 已提交
232 233 234 235 236 237 238 239 240 241 242
	$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>;
	$tryApplyWorkspaceEdit(workspaceEditDto: WorkspaceEditDto): Promise<boolean>;
	$tryInsertSnippet(id: string, template: string, selections: IRange[], opts: IUndoStopOptions): Promise<boolean>;
	$getDiffInformation(id: string): Promise<editorCommon.ILineChange[]>;
243 244
}

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

252
export interface MainThreadErrorsShape extends IDisposable {
253
	$onUnexpectedError(err: any | SerializedError): void;
254 255
}

256
export interface MainThreadConsoleShape extends IDisposable {
257
	$logExtensionHostMessage(msg: IRemoteConsoleLog): void;
258 259
}

A
Alex Dima 已提交
260 261 262 263 264 265 266
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>;
}

267 268 269 270 271 272 273 274 275 276 277 278 279
export interface ISerializedRegExp {
	pattern: string;
	flags?: string;
}
export interface ISerializedIndentationRule {
	decreaseIndentPattern: ISerializedRegExp;
	increaseIndentPattern: ISerializedRegExp;
	indentNextLinePattern?: ISerializedRegExp;
	unIndentedLinePattern?: ISerializedRegExp;
}
export interface ISerializedOnEnterRule {
	beforeText: ISerializedRegExp;
	afterText?: ISerializedRegExp;
280
	oneLineAboveText?: ISerializedRegExp;
281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306
	action: EnterAction;
}
export interface ISerializedLanguageConfiguration {
	comments?: CommentRule;
	brackets?: CharacterPair[];
	wordPattern?: ISerializedRegExp;
	indentationRules?: ISerializedIndentationRule;
	onEnterRules?: ISerializedOnEnterRule[];
	__electricCharacterSupport?: {
		brackets?: any;
		docComment?: {
			scope: string;
			open: string;
			lineStart: string;
			close?: string;
		};
	};
	__characterPairSupport?: {
		autoClosingPairs: {
			open: string;
			close: string;
			notIn?: string[];
		}[];
	};
}

307 308
export type GlobPattern = string | { base: string; pattern: string };

A
Alex Dima 已提交
309 310 311 312
export interface ISerializedDocumentFilter {
	$serialized: true;
	language?: string;
	scheme?: string;
313
	pattern?: string | IRelativePattern;
314
	exclusive?: boolean;
A
Alex Dima 已提交
315 316
}

317
export interface ISerializedSignatureHelpProviderMetadata {
318 319
	readonly triggerCharacters: readonly string[];
	readonly retriggerCharacters: readonly string[];
320 321
}

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

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

356
export interface MainThreadMessageOptions {
357
	extension?: IExtensionDescription;
358
	modal?: boolean;
359 360
}

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

365
export interface MainThreadOutputServiceShape extends IDisposable {
J
Johannes Rieken 已提交
366
	$register(label: string, log: boolean, file?: UriComponents): Promise<string>;
367 368 369 370 371 372
	$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;
373 374
}

375
export interface MainThreadProgressShape extends IDisposable {
376

377 378 379
	$startProgress(handle: number, options: IProgressOptions): void;
	$progressReport(handle: number, message: IProgressStep): void;
	$progressEnd(handle: number): void;
380 381
}

382
export interface MainThreadTerminalServiceShape extends IDisposable {
383
	$createTerminal(name?: string, shellPath?: string, shellArgs?: string[] | string, cwd?: string | UriComponents, env?: { [key: string]: string | null }, waitOnExit?: boolean, strictEnv?: boolean): Promise<{ id: number, name: string }>;
J
Johannes Rieken 已提交
384
	$createTerminalRenderer(name: string): Promise<number>;
385 386 387 388
	$dispose(terminalId: number): void;
	$hide(terminalId: number): void;
	$sendText(terminalId: number, text: string, addNewLine: boolean): void;
	$show(terminalId: number, preserveFocus: boolean): void;
D
Daniel Imms 已提交
389
	$registerOnDataListener(terminalId: number): void;
390

391
	// Process
392 393 394
	$sendProcessTitle(terminalId: number, title: string): void;
	$sendProcessData(terminalId: number, data: string): void;
	$sendProcessPid(terminalId: number, pid: number): void;
D
Daniel Imms 已提交
395
	$sendProcessExit(terminalId: number, exitCode: number): void;
396 397
	$sendProcessInitialCwd(terminalId: number, cwd: string): void;
	$sendProcessCwd(terminalId: number, initialCwd: string): void;
398 399 400

	// Renderer
	$terminalRendererSetName(terminalId: number, name: string): void;
D
Daniel Imms 已提交
401
	$terminalRendererSetDimensions(terminalId: number, dimensions: ITerminalDimensions): void;
402
	$terminalRendererWrite(terminalId: number, text: string): void;
D
Daniel Imms 已提交
403
	$terminalRendererRegisterOnInputListener(terminalId: number): void;
D
Daniel Imms 已提交
404 405
}

J
Johannes Rieken 已提交
406
export interface TransferQuickPickItems extends quickInput.IQuickPickItem {
407 408
	handle: number;
}
C
Christof Marti 已提交
409

J
Johannes Rieken 已提交
410
export interface TransferQuickInputButton extends quickInput.IQuickInputButton {
411 412
	handle: number;
}
413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436

export type TransferQuickInput = TransferQuickPick | TransferInputBox;

export interface BaseTransferQuickInput {

	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 已提交
437
	buttons?: TransferQuickInputButton[];
438

C
Christof Marti 已提交
439
	items?: TransferQuickPickItems[];
440

441 442 443 444
	activeItems?: number[];

	selectedItems?: number[];

445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463
	canSelectMany?: boolean;

	ignoreFocusOut?: boolean;

	matchOnDescription?: boolean;

	matchOnDetail?: boolean;
}

export interface TransferInputBox extends BaseTransferQuickInput {

	type?: 'inputBox';

	value?: string;

	placeholder?: string;

	password?: boolean;

C
Christof Marti 已提交
464
	buttons?: TransferQuickInputButton[];
465 466 467 468 469 470

	prompt?: string;

	validationMessage?: string;
}

471 472 473 474 475 476 477 478 479
export interface IInputBoxOptions {
	value?: string;
	valueSelection?: [number, number];
	prompt?: string;
	placeHolder?: string;
	password?: boolean;
	ignoreFocusOut?: boolean;
}

480
export interface MainThreadQuickOpenShape extends IDisposable {
J
Johannes Rieken 已提交
481
	$show(instance: number, options: quickInput.IPickOptions<TransferQuickPickItems>, token: CancellationToken): Promise<number | number[] | undefined>;
J
Johannes Rieken 已提交
482 483
	$setItems(instance: number, items: TransferQuickPickItems[]): Promise<void>;
	$setError(instance: number, error: Error): Promise<void>;
484
	$input(options: IInputBoxOptions | undefined, validateInput: boolean, token: CancellationToken): Promise<string>;
J
Johannes Rieken 已提交
485 486
	$createOrUpdate(params: TransferQuickInput): Promise<void>;
	$dispose(id: number): Promise<void>;
487 488
}

489
export interface MainThreadStatusBarShape extends IDisposable {
J
Johannes Rieken 已提交
490
	$setEntry(id: number, extensionId: ExtensionIdentifier | undefined, text: string, tooltip: string, command: string, color: string | ThemeColor, alignment: statusbar.StatusbarAlignment, priority: number | undefined): void;
491
	$dispose(id: number): void;
492 493
}

494
export interface MainThreadStorageShape extends IDisposable {
495
	$getValue<T>(shared: boolean, key: string): Promise<T | undefined>;
J
Johannes Rieken 已提交
496
	$setValue(shared: boolean, key: string, value: object): Promise<void>;
497 498
}

499
export interface MainThreadTelemetryShape extends IDisposable {
500
	$publicLog(eventName: string, data?: any): void;
501 502
}

503
export type WebviewPanelHandle = string;
M
Matt Bierner 已提交
504

505 506
export type WebviewInsetHandle = number;

M
Matt Bierner 已提交
507 508 509 510 511
export interface WebviewPanelShowOptions {
	readonly viewColumn?: EditorViewColumn;
	readonly preserveFocus?: boolean;
}

M
Matt Bierner 已提交
512
export interface MainThreadWebviewsShape extends IDisposable {
513
	$createWebviewPanel(handle: WebviewPanelHandle, viewType: string, title: string, showOptions: WebviewPanelShowOptions, options: modes.IWebviewPanelOptions & modes.IWebviewOptions, extensionId: ExtensionIdentifier, extensionLocation: UriComponents): void;
514
	$createWebviewCodeInset(handle: WebviewInsetHandle, symbolId: string, options: modes.IWebviewOptions, extensionId: ExtensionIdentifier | undefined, extensionLocation: UriComponents | undefined): void;
515
	$disposeWebview(handle: WebviewPanelHandle): void;
M
Matt Bierner 已提交
516
	$reveal(handle: WebviewPanelHandle, showOptions: WebviewPanelShowOptions): void;
517
	$setTitle(handle: WebviewPanelHandle, value: string): void;
518
	$setIconPath(handle: WebviewPanelHandle, value: { light: UriComponents, dark: UriComponents } | undefined): void;
519 520

	$setHtml(handle: WebviewPanelHandle | WebviewInsetHandle, value: string): void;
521
	$setOptions(handle: WebviewPanelHandle | WebviewInsetHandle, options: modes.IWebviewOptions): void;
522
	$postMessage(handle: WebviewPanelHandle | WebviewInsetHandle, value: any): Promise<boolean>;
523 524 525

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

M
Matt Bierner 已提交
528 529 530 531 532 533
export interface WebviewPanelViewState {
	readonly active: boolean;
	readonly visible: boolean;
	readonly position: EditorViewColumn;
}

M
Matt Bierner 已提交
534
export interface ExtHostWebviewsShape {
535
	$onMessage(handle: WebviewPanelHandle, message: any): void;
M
Matt Bierner 已提交
536
	$onDidChangeWebviewPanelViewState(handle: WebviewPanelHandle, newState: WebviewPanelViewState): void;
J
Johannes Rieken 已提交
537
	$onDidDisposeWebviewPanel(handle: WebviewPanelHandle): Promise<void>;
538
	$deserializeWebviewPanel(newWebviewHandle: WebviewPanelHandle, viewType: string, title: string, state: any, position: EditorViewColumn, options: modes.IWebviewOptions): Promise<void>;
M
Matt Bierner 已提交
539 540
}

J
Joao Moreno 已提交
541
export interface MainThreadUrlsShape extends IDisposable {
542
	$registerUriHandler(handle: number, extensionId: ExtensionIdentifier): Promise<void>;
J
Johannes Rieken 已提交
543
	$unregisterUriHandler(handle: number): Promise<void>;
J
Joao Moreno 已提交
544 545 546
}

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

550 551 552 553
export interface ITextSearchComplete {
	limitHit?: boolean;
}

554
export interface MainThreadWorkspaceShape extends IDisposable {
555
	$startFileSearch(includePattern: string | undefined, includeFolder: UriComponents | undefined, excludePatternOrDisregardExcludes: string | false | undefined, maxResults: number | undefined, token: CancellationToken): Promise<UriComponents[] | undefined>;
556
	$startTextSearch(query: search.IPatternInfo, options: ITextQueryBuilderOptions, requestId: number, token: CancellationToken): Promise<ITextSearchComplete>;
J
Johannes Rieken 已提交
557 558 559
	$checkExists(includes: string[], token: CancellationToken): Promise<boolean>;
	$saveAll(includeUntitled?: boolean): Promise<boolean>;
	$updateWorkspaceFolders(extensionName: string, index: number, deleteCount: number, workspaceFoldersToAdd: { uri: UriComponents, name?: string }[]): Promise<void>;
560
	$resolveProxy(url: string): Promise<string | undefined>;
561
}
562

J
Johannes Rieken 已提交
563 564
export interface IFileChangeDto {
	resource: UriComponents;
J
Johannes Rieken 已提交
565
	type: files.FileChangeType;
J
Johannes Rieken 已提交
566 567
}

568
export interface MainThreadFileSystemShape extends IDisposable {
J
Johannes Rieken 已提交
569
	$registerFileSystemProvider(handle: number, scheme: string, capabilities: files.FileSystemProviderCapabilities): void;
570
	$unregisterProvider(handle: number): void;
571 572
	$registerResourceLabelFormatter(handle: number, formatter: ResourceLabelFormatter): void;
	$unregisterResourceLabelFormatter(handle: number): void;
J
Johannes Rieken 已提交
573
	$onFileSystemChange(handle: number, resource: IFileChangeDto[]): void;
574
}
J
Johannes Rieken 已提交
575

576
export interface MainThreadSearchShape extends IDisposable {
577 578
	$registerFileSearchProvider(handle: number, scheme: string): void;
	$registerTextSearchProvider(handle: number, scheme: string): void;
579
	$unregisterProvider(handle: number): void;
580
	$handleFileMatch(handle: number, session: number, data: UriComponents[]): void;
J
Johannes Rieken 已提交
581
	$handleTextMatch(handle: number, session: number, data: search.IRawFileMatch2[]): void;
582
	$handleTelemetry(eventName: string, data: any): void;
583 584
}

585
export interface MainThreadTaskShape extends IDisposable {
J
Johannes Rieken 已提交
586
	$createTaskId(task: tasks.TaskDTO): Promise<string>;
J
Johannes Rieken 已提交
587 588
	$registerTaskProvider(handle: number): Promise<void>;
	$unregisterTaskProvider(handle: number): Promise<void>;
J
Johannes Rieken 已提交
589 590
	$fetchTasks(filter?: tasks.TaskFilterDTO): Promise<tasks.TaskDTO[]>;
	$executeTask(task: tasks.TaskHandleDTO | tasks.TaskDTO): Promise<tasks.TaskExecutionDTO>;
J
Johannes Rieken 已提交
591
	$terminateTask(id: string): Promise<void>;
J
Johannes Rieken 已提交
592
	$registerTaskSystem(scheme: string, info: tasks.TaskSystemInfoDTO): void;
G
Gabriel DeBacker 已提交
593
	$customExecutionComplete(id: string, result?: number): Promise<void>;
594 595
}

596
export interface MainThreadExtensionServiceShape extends IDisposable {
A
Alex Dima 已提交
597
	$activateExtension(extensionId: ExtensionIdentifier, activationEvent: string | null): Promise<void>;
598
	$onWillActivateExtension(extensionId: ExtensionIdentifier): void;
A
Alex Dima 已提交
599
	$onDidActivateExtension(extensionId: ExtensionIdentifier, startup: boolean, codeLoadingTime: number, activateCallTime: number, activateResolvedTime: number, activationEvent: string | null): void;
600
	$onExtensionActivationError(extensionId: ExtensionIdentifier, error: ExtensionActivationError): Promise<void>;
601
	$onExtensionRuntimeError(extensionId: ExtensionIdentifier, error: SerializedError): void;
A
Alex Dima 已提交
602
	$onExtensionHostExit(code: number): void;
603 604
}

J
Joao Moreno 已提交
605
export interface SCMProviderFeatures {
J
Joao Moreno 已提交
606 607
	hasQuickDiffProvider?: boolean;
	count?: number;
608 609
	commitTemplate?: string;
	acceptInputCommand?: modes.Command;
J
Joao Moreno 已提交
610
	statusBarCommands?: CommandDto[];
J
Joao Moreno 已提交
611 612 613 614
}

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

J
Joao Moreno 已提交
617
export type SCMRawResource = [
618
	number /*handle*/,
619
	UriComponents /*resourceUri*/,
J
Joao Moreno 已提交
620
	string[] /*icons: light, dark*/,
621
	string /*tooltip*/,
622
	boolean /*strike through*/,
623 624
	boolean /*faded*/,

J
Joao Moreno 已提交
625 626 627
	string | undefined /*source*/,
	string | undefined /*letter*/,
	ThemeColor | null /*color*/
J
Joao Moreno 已提交
628
];
629

630 631 632
export type SCMRawResourceSplice = [
	number /* start */,
	number /* delete count */,
J
Joao 已提交
633 634 635
	SCMRawResource[]
];

636 637 638 639 640
export type SCMRawResourceSplices = [
	number, /*handle*/
	SCMRawResourceSplice[]
];

641
export interface MainThreadSCMShape extends IDisposable {
642
	$registerSourceControl(handle: number, id: string, label: string, rootUri: UriComponents | undefined): void;
643 644
	$updateSourceControl(handle: number, features: SCMProviderFeatures): void;
	$unregisterSourceControl(handle: number): void;
J
Joao Moreno 已提交
645

646 647 648 649
	$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 已提交
650

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

J
Joao Moreno 已提交
653
	$setInputBoxValue(sourceControlHandle: number, value: string): void;
654
	$setInputBoxPlaceholder(sourceControlHandle: number, placeholder: string): void;
655
	$setInputBoxVisibility(sourceControlHandle: number, visible: boolean): void;
656
	$setValidationProviderIsEnabled(sourceControlHandle: number, enabled: boolean): void;
J
Joao Moreno 已提交
657 658
}

659 660
export type DebugSessionUUID = string;

661 662 663 664 665 666 667
export interface IDebugConfiguration {
	type: string;
	name: string;
	request: string;
	[key: string]: any;
}

668
export interface MainThreadDebugServiceShape extends IDisposable {
A
Alex Dima 已提交
669
	$registerDebugTypes(debugTypes: string[]): void;
670
	$sessionCached(sessionID: string): void;
A
Alex Dima 已提交
671
	$acceptDAMessage(handle: number, message: DebugProtocol.ProtocolMessage): void;
672 673
	$acceptDAError(handle: number, name: string, message: string, stack: string | undefined): void;
	$acceptDAExit(handle: number, code: number | undefined, signal: string | undefined): void;
A
Andre Weinand 已提交
674
	$registerDebugConfigurationProvider(type: string, hasProvideMethod: boolean, hasResolveMethod: boolean, hasProvideDaMethod: boolean, handle: number): Promise<void>;
J
Johannes Rieken 已提交
675
	$registerDebugAdapterDescriptorFactory(type: string, handle: number): Promise<void>;
676
	$registerDebugAdapterTrackerFactory(type: string, handle: number): Promise<any>;
677
	$unregisterDebugConfigurationProvider(handle: number): void;
A
Andre Weinand 已提交
678 679
	$unregisterDebugAdapterDescriptorFactory(handle: number): void;
	$unregisterDebugAdapterTrackerFactory(handle: number): void;
680
	$startDebugging(folder: UriComponents | undefined, nameOrConfig: string | IDebugConfiguration, parentSessionID: string | undefined): Promise<boolean>;
J
Johannes Rieken 已提交
681
	$customDebugAdapterRequest(id: DebugSessionUUID, command: string, args: any): Promise<any>;
682 683
	$appendDebugConsole(value: string): void;
	$startBreakpointEvents(): void;
684
	$registerBreakpoints(breakpoints: Array<ISourceMultiBreakpointDto | IFunctionBreakpointDto>): Promise<void>;
J
Johannes Rieken 已提交
685
	$unregisterBreakpoints(breakpointIds: string[], functionBreakpointIds: string[]): Promise<void>;
686 687
}

688
export interface MainThreadWindowShape extends IDisposable {
J
Johannes Rieken 已提交
689
	$getWindowVisibility(): Promise<boolean>;
690
	$openUri(uri: UriComponents): Promise<boolean>;
691 692
}

693 694
// -- extension host

695
export interface ExtHostCommandsShape {
J
Johannes Rieken 已提交
696 697
	$executeContributedCommand<T>(id: string, ...args: any[]): Promise<T>;
	$getContributedCommandHandlerDescriptions(): Promise<{ [id: string]: string | ICommandHandlerDescription }>;
698 699
}

700
export interface ExtHostConfigurationShape {
701 702
	$initializeConfiguration(data: IConfigurationInitData): void;
	$acceptConfigurationChanged(data: IConfigurationInitData, eventData: IWorkspaceConfigurationChangeEventData): void;
703 704
}

705
export interface ExtHostDiagnosticsShape {
706 707 708

}

709
export interface ExtHostDocumentContentProvidersShape {
M
Matt Bierner 已提交
710
	$provideTextDocumentContent(handle: number, uri: UriComponents): Promise<string | null | undefined>;
711 712
}

713
export interface IModelAddedData {
714
	uri: UriComponents;
715
	versionId: number;
716 717
	lines: string[];
	EOL: string;
718 719 720
	modeId: string;
	isDirty: boolean;
}
721
export interface ExtHostDocumentsShape {
722 723 724 725
	$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;
726 727
}

728
export interface ExtHostDocumentSaveParticipantShape {
J
Johannes Rieken 已提交
729
	$participateInSave(resource: UriComponents, reason: SaveReason): Promise<boolean[]>;
730 731
}

732 733
export interface ITextEditorAddData {
	id: string;
734
	documentUri: UriComponents;
735
	options: IResolvedTextEditorConfiguration;
A
Alex Dima 已提交
736
	selections: ISelection[];
737
	visibleRanges: IRange[];
A
Alex Dima 已提交
738
	editorPosition: EditorViewColumn | undefined;
739 740
}
export interface ITextEditorPositionData {
741
	[id: string]: EditorViewColumn;
742
}
743 744 745
export interface IEditorPropertiesChangeData {
	options: IResolvedTextEditorConfiguration | null;
	selections: ISelectionChangeEvent | null;
746
	visibleRanges: IRange[] | null;
747 748 749 750 751 752
}
export interface ISelectionChangeEvent {
	selections: Selection[];
	source?: string;
}

753
export interface ExtHostEditorsShape {
754
	$acceptEditorPropertiesChanged(id: string, props: IEditorPropertiesChangeData): void;
755
	$acceptEditorPositionData(data: ITextEditorPositionData): void;
756 757
}

J
Johannes Rieken 已提交
758
export interface IDocumentsAndEditorsDelta {
759
	removedDocuments?: UriComponents[];
J
Johannes Rieken 已提交
760 761 762
	addedDocuments?: IModelAddedData[];
	removedEditors?: string[];
	addedEditors?: ITextEditorAddData[];
A
Alex Dima 已提交
763
	newActiveEditor?: string | null;
J
Johannes Rieken 已提交
764 765
}

766 767
export interface ExtHostDocumentsAndEditorsShape {
	$acceptDocumentsAndEditorsDelta(delta: IDocumentsAndEditorsDelta): void;
J
Johannes Rieken 已提交
768 769
}

770
export interface ExtHostTreeViewsShape {
J
Johannes Rieken 已提交
771
	$getChildren(treeViewId: string, treeItemHandle?: string): Promise<ITreeItem[]>;
772
	$setExpanded(treeViewId: string, treeItemHandle: string, expanded: boolean): void;
773
	$setSelection(treeViewId: string, treeItemHandles: string[]): void;
774
	$setVisible(treeViewId: string, visible: boolean): void;
S
Sandeep Somavarapu 已提交
775 776
}

777
export interface ExtHostWorkspaceShape {
778
	$initializeWorkspace(workspace: IWorkspaceData | null): void;
779
	$acceptWorkspaceData(workspace: IWorkspaceData | null): void;
J
Johannes Rieken 已提交
780
	$handleTextSearchResult(result: search.IRawFileMatch2, requestId: number): void;
781
}
782

783
export interface ExtHostFileSystemShape {
J
Johannes Rieken 已提交
784 785
	$stat(handle: number, resource: UriComponents): Promise<files.IStat>;
	$readdir(handle: number, resource: UriComponents): Promise<[string, files.FileType][]>;
J
Johannes Rieken 已提交
786
	$readFile(handle: number, resource: UriComponents): Promise<Buffer>;
J
Johannes Rieken 已提交
787 788 789
	$writeFile(handle: number, resource: UriComponents, content: Buffer, opts: files.FileWriteOptions): Promise<void>;
	$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 已提交
790
	$mkdir(handle: number, resource: UriComponents): Promise<void>;
J
Johannes Rieken 已提交
791 792
	$delete(handle: number, resource: UriComponents, opts: files.FileDeleteOptions): Promise<void>;
	$watch(handle: number, session: number, resource: UriComponents, opts: files.IWatchOptions): void;
793
	$unwatch(handle: number, session: number): void;
J
Johannes Rieken 已提交
794
	$open(handle: number, resource: UriComponents, opts: files.FileOpenOptions): Promise<number>;
J
Johannes Rieken 已提交
795
	$close(handle: number, fd: number): Promise<void>;
796 797
	$read(handle: number, fd: number, pos: number, length: number): Promise<Buffer>;
	$write(handle: number, fd: number, pos: number, data: Buffer): Promise<number>;
798
}
799

800
export interface ExtHostSearchShape {
J
Johannes Rieken 已提交
801 802
	$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 已提交
803
	$clearCache(cacheKey: string): Promise<void>;
804 805
}

806
export interface ExtHostExtensionServiceShape {
J
Johannes Rieken 已提交
807
	$resolveAuthority(remoteAuthority: string): Promise<ResolvedAuthority>;
808
	$startExtensionHost(enabledExtensionIds: ExtensionIdentifier[]): Promise<void>;
J
Johannes Rieken 已提交
809
	$activateByEvent(activationEvent: string): Promise<void>;
810
	$activate(extensionId: ExtensionIdentifier, activationEvent: string): Promise<boolean>;
811

812
	$deltaExtensions(toAdd: IExtensionDescription[], toRemove: ExtensionIdentifier[]): Promise<void>;
813 814 815 816

	$test_latency(n: number): Promise<number>;
	$test_up(b: Buffer): Promise<number>;
	$test_down(size: number): Promise<Buffer>;
817 818 819
}

export interface FileSystemEvents {
J
Johannes Rieken 已提交
820 821 822
	created: UriComponents[];
	changed: UriComponents[];
	deleted: UriComponents[];
823
}
824
export interface ExtHostFileSystemEventServiceShape {
825
	$onFileEvent(events: FileSystemEvents): void;
826
	$onFileRename(oldUri: UriComponents, newUri: UriComponents): void;
J
Johannes Rieken 已提交
827
	$onWillRename(oldUri: UriComponents, newUri: UriComponents): Promise<any>;
828 829
}

J
Johannes Rieken 已提交
830
export interface ObjectIdentifier {
831
	$ident?: number;
J
Johannes Rieken 已提交
832 833 834
}

export namespace ObjectIdentifier {
835
	export const name = '$ident';
J
Johannes Rieken 已提交
836
	export function mixin<T>(obj: T, id: number): T & ObjectIdentifier {
837
		Object.defineProperty(obj, name, { value: id, enumerable: true });
J
Johannes Rieken 已提交
838 839
		return <T & ObjectIdentifier>obj;
	}
840 841
	export function of(obj: any): number {
		return obj[name];
J
Johannes Rieken 已提交
842 843 844
	}
}

845 846
export interface ExtHostHeapServiceShape {
	$onGarbageCollection(ids: number[]): void;
847
}
848
export interface IRawColorInfo {
J
Joao Moreno 已提交
849
	color: [number, number, number, number];
850 851 852
	range: IRange;
}

853 854 855 856 857 858 859 860 861
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 已提交
862 863 864 865 866 867 868 869 870 871 872 873 874 875 876
export interface SuggestDataDto {
	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
877
	x?: ChainedCacheId;
J
Johannes Rieken 已提交
878 879 880
}

export interface SuggestResultDto {
881
	x?: number;
J
Johannes Rieken 已提交
882 883 884
	a: IRange;
	b: SuggestDataDto[];
	c?: boolean;
885 886
}

887 888 889
export interface LocationDto {
	uri: UriComponents;
	range: IRange;
890 891
}

M
Matt Bierner 已提交
892
export interface DefinitionLinkDto {
J
Johannes Rieken 已提交
893
	originSelectionRange?: IRange;
M
Matt Bierner 已提交
894 895
	uri: UriComponents;
	range: IRange;
J
Johannes Rieken 已提交
896
	targetSelectionRange?: IRange;
M
Matt Bierner 已提交
897 898
}

899
export interface WorkspaceSymbolDto extends IdObject {
900 901 902 903 904 905 906
	name: string;
	containerName?: string;
	kind: modes.SymbolKind;
	location: LocationDto;
}

export interface WorkspaceSymbolsDto extends IdObject {
907
	symbols: WorkspaceSymbolDto[];
908 909
}

910
export interface ResourceFileEditDto {
M
Matt Bierner 已提交
911 912
	oldUri?: UriComponents;
	newUri?: UriComponents;
913 914 915 916 917 918
	options?: {
		overwrite?: boolean;
		ignoreIfExists?: boolean;
		ignoreIfNotExists?: boolean;
		recursive?: boolean;
	};
919 920 921
}

export interface ResourceTextEditDto {
922
	resource: UriComponents;
923 924
	modelVersionId?: number;
	edits: modes.TextEdit[];
925 926
}

927
export interface WorkspaceEditDto {
928
	edits: Array<ResourceFileEditDto | ResourceTextEditDto>;
929 930

	// todo@joh reject should go into rename
931 932 933
	rejectReason?: string;
}

A
Alex Dima 已提交
934
export function reviveWorkspaceEditDto(data: WorkspaceEditDto | undefined): modes.WorkspaceEdit {
935 936 937 938 939 940 941 942 943 944 945 946 947
	if (data && data.edits) {
		for (const edit of data.edits) {
			if (typeof (<ResourceTextEditDto>edit).resource === 'object') {
				(<ResourceTextEditDto>edit).resource = URI.revive((<ResourceTextEditDto>edit).resource);
			} else {
				(<ResourceFileEditDto>edit).newUri = URI.revive((<ResourceFileEditDto>edit).newUri);
				(<ResourceFileEditDto>edit).oldUri = URI.revive((<ResourceFileEditDto>edit).oldUri);
			}
		}
	}
	return <modes.WorkspaceEdit>data;
}

948 949
export type CommandDto = ObjectIdentifier & modes.Command;

950 951
export interface CodeActionDto {
	title: string;
952
	edit?: WorkspaceEditDto;
953
	diagnostics?: IMarkerData[];
954
	command?: CommandDto;
J
Johannes Rieken 已提交
955
	kind?: string;
956
	isPreferred?: boolean;
957
}
958

959 960 961 962 963 964 965 966 967 968
export type CacheId = number;
export type ChainedCacheId = [CacheId, CacheId];

export interface LinksListDto {
	id?: CacheId;
	links: LinkDto[];
}

export interface LinkDto {
	cacheId?: ChainedCacheId;
M
Martin Aeschlimann 已提交
969 970 971
	range: IRange;
	url?: string | UriComponents;
}
972

973 974 975 976 977
export interface CodeLensDto extends ObjectIdentifier {
	range: IRange;
	id?: string;
	command?: CommandDto;
}
978

979
export type CodeInsetDto = ObjectIdentifier & codeInset.ICodeInsetSymbol;
R
Rob DeLine 已提交
980

981 982 983 984 985 986 987 988 989 990
export interface CallHierarchyDto {
	_id: number;
	kind: modes.SymbolKind;
	name: string;
	detail?: string;
	uri: UriComponents;
	range: IRange;
	selectionRange: IRange;
}

991
export interface ExtHostLanguageFeaturesShape {
992
	$provideDocumentSymbols(handle: number, resource: UriComponents, token: CancellationToken): Promise<modes.DocumentSymbol[] | undefined>;
993
	$provideCodeLenses(handle: number, resource: UriComponents, token: CancellationToken): Promise<CodeLensDto[]>;
994
	$resolveCodeLens(handle: number, symbol: CodeLensDto, token: CancellationToken): Promise<CodeLensDto | undefined>;
995
	$provideCodeInsets(handle: number, resource: UriComponents, token: CancellationToken): Promise<CodeInsetDto[] | undefined>;
R
Rob DeLine 已提交
996
	$resolveCodeInset(handle: number, resource: UriComponents, symbol: CodeInsetDto, token: CancellationToken): Promise<CodeInsetDto>;
J
Johannes Rieken 已提交
997 998 999 1000
	$provideDefinition(handle: number, resource: UriComponents, position: IPosition, token: CancellationToken): Promise<DefinitionLinkDto[]>;
	$provideDeclaration(handle: number, resource: UriComponents, position: IPosition, token: CancellationToken): Promise<DefinitionLinkDto[]>;
	$provideImplementation(handle: number, resource: UriComponents, position: IPosition, token: CancellationToken): Promise<DefinitionLinkDto[]>;
	$provideTypeDefinition(handle: number, resource: UriComponents, position: IPosition, token: CancellationToken): Promise<DefinitionLinkDto[]>;
1001 1002 1003 1004 1005 1006 1007
	$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>;
	$provideReferences(handle: number, resource: UriComponents, position: IPosition, context: modes.ReferenceContext, token: CancellationToken): Promise<LocationDto[] | undefined>;
	$provideCodeActions(handle: number, resource: UriComponents, rangeOrSelection: IRange | ISelection, context: modes.CodeActionContext, token: CancellationToken): Promise<CodeActionDto[] | undefined>;
	$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 已提交
1008
	$provideWorkspaceSymbols(handle: number, search: string, token: CancellationToken): Promise<WorkspaceSymbolsDto>;
1009
	$resolveWorkspaceSymbol(handle: number, symbol: WorkspaceSymbolDto, token: CancellationToken): Promise<WorkspaceSymbolDto | undefined>;
1010
	$releaseWorkspaceSymbols(handle: number, id: number): void;
1011 1012
	$provideRenameEdits(handle: number, resource: UriComponents, position: IPosition, newName: string, token: CancellationToken): Promise<WorkspaceEditDto | undefined>;
	$resolveRenameLocation(handle: number, resource: UriComponents, position: IPosition, token: CancellationToken): Promise<modes.RenameLocation | undefined>;
1013
	$provideCompletionItems(handle: number, resource: UriComponents, position: IPosition, context: modes.CompletionContext, token: CancellationToken): Promise<SuggestResultDto | undefined>;
1014
	$resolveCompletionItem(handle: number, resource: UriComponents, position: IPosition, id: ChainedCacheId, token: CancellationToken): Promise<SuggestDataDto | undefined>;
1015
	$releaseCompletionItems(handle: number, id: number): void;
1016
	$provideSignatureHelp(handle: number, resource: UriComponents, position: IPosition, context: modes.SignatureHelpContext, token: CancellationToken): Promise<modes.SignatureHelp | undefined>;
1017
	$provideDocumentLinks(handle: number, resource: UriComponents, token: CancellationToken): Promise<LinksListDto | undefined>;
1018
	$resolveDocumentLink(handle: number, id: ChainedCacheId, token: CancellationToken): Promise<LinkDto | undefined>;
1019
	$releaseDocumentLinks(handle: number, id: number): void;
J
Johannes Rieken 已提交
1020
	$provideDocumentColors(handle: number, resource: UriComponents, token: CancellationToken): Promise<IRawColorInfo[]>;
M
Matt Bierner 已提交
1021 1022
	$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>;
1023
	$provideSelectionRanges(handle: number, resource: UriComponents, positions: IPosition[], token: CancellationToken): Promise<modes.SelectionRange[][]>;
1024 1025
	$provideCallHierarchyItem(handle: number, resource: UriComponents, position: IPosition, token: CancellationToken): Promise<CallHierarchyDto | undefined>;
	$resolveCallHierarchyItem(handle: number, item: callHierarchy.CallHierarchyItem, direction: callHierarchy.CallHierarchyDirection, token: CancellationToken): Promise<[CallHierarchyDto, modes.Location[]][]>;
1026 1027
}

1028 1029
export interface ExtHostQuickOpenShape {
	$onItemSelected(handle: number): void;
M
Matt Bierner 已提交
1030
	$validateInput(input: string): Promise<string | null | undefined>;
1031 1032 1033
	$onDidChangeActive(sessionId: number, handles: number[]): void;
	$onDidChangeSelection(sessionId: number, handles: number[]): void;
	$onDidAccept(sessionId: number): void;
1034
	$onDidChangeValue(sessionId: number, value: string): void;
C
Christof Marti 已提交
1035
	$onDidTriggerButton(sessionId: number, handle: number): void;
1036
	$onDidHide(sessionId: number): void;
1037 1038
}

1039 1040 1041 1042
export interface ShellLaunchConfigDto {
	name?: string;
	executable?: string;
	args?: string[] | string;
1043
	cwd?: string | UriComponents;
1044
	env?: { [key: string]: string | null };
1045 1046
}

1047 1048
export interface ExtHostTerminalServiceShape {
	$acceptTerminalClosed(id: number): void;
1049
	$acceptTerminalOpened(id: number, name: string): void;
1050
	$acceptActiveTerminalChanged(id: number | null): void;
1051
	$acceptTerminalProcessId(id: number, processId: number): void;
A
Alex Dima 已提交
1052
	$acceptTerminalProcessData(id: number, data: string): void;
D
Daniel Imms 已提交
1053
	$acceptTerminalRendererInput(id: number, data: string): void;
1054
	$acceptTerminalTitleChange(id: number, name: string): void;
1055
	$acceptTerminalDimensions(id: number, cols: number, rows: number): void;
1056
	$createProcess(id: number, shellLaunchConfig: ShellLaunchConfigDto, activeWorkspaceRootUri: UriComponents, cols: number, rows: number): void;
D
Daniel Imms 已提交
1057 1058
	$acceptProcessInput(id: number, data: string): void;
	$acceptProcessResize(id: number, cols: number, rows: number): void;
1059
	$acceptProcessShutdown(id: number, immediate: boolean): void;
1060 1061
	$acceptProcessRequestInitialCwd(id: number): void;
	$acceptProcessRequestCwd(id: number): void;
1062
	$acceptProcessRequestLatency(id: number): number;
1063 1064
}

1065
export interface ExtHostSCMShape {
M
Matt Bierner 已提交
1066
	$provideOriginalResource(sourceControlHandle: number, uri: UriComponents, token: CancellationToken): Promise<UriComponents | null>;
A
Alex Dima 已提交
1067
	$onInputBoxValueChange(sourceControlHandle: number, value: string): void;
J
Johannes Rieken 已提交
1068 1069 1070
	$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 已提交
1071 1072
}

1073
export interface ExtHostTaskShape {
J
Johannes Rieken 已提交
1074 1075 1076 1077 1078
	$provideTasks(handle: number, validTypes: { [key: string]: boolean; }): Thenable<tasks.TaskSetDTO>;
	$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 已提交
1079
	$resolveVariables(workspaceFolder: UriComponents, toResolve: { process?: { name: string; cwd?: string }, variables: string[] }): Promise<{ process?: string; variables: { [key: string]: string } }>;
1080 1081
}

1082 1083
export interface IBreakpointDto {
	type: string;
1084
	id?: string;
1085 1086 1087
	enabled: boolean;
	condition?: string;
	hitCondition?: string;
1088 1089 1090 1091 1092
	logMessage?: string;
}

export interface IFunctionBreakpointDto extends IBreakpointDto {
	type: 'function';
1093
	functionName: string;
1094 1095
}

1096
export interface ISourceBreakpointDto extends IBreakpointDto {
1097
	type: 'source';
1098
	uri: UriComponents;
1099 1100
	line: number;
	character: number;
1101 1102
}

1103
export interface IBreakpointsDeltaDto {
1104
	added?: Array<ISourceBreakpointDto | IFunctionBreakpointDto>;
1105
	removed?: string[];
1106
	changed?: Array<ISourceBreakpointDto | IFunctionBreakpointDto>;
1107 1108
}

1109 1110 1111 1112
export interface ISourceMultiBreakpointDto {
	type: 'sourceMulti';
	uri: UriComponents;
	lines: {
1113
		id: string;
1114 1115 1116
		enabled: boolean;
		condition?: string;
		hitCondition?: string;
1117
		logMessage?: string;
1118 1119 1120
		line: number;
		character: number;
	}[];
1121 1122
}

A
Andre Weinand 已提交
1123
export interface IDebugSessionFullDto {
1124 1125 1126
	id: DebugSessionUUID;
	type: string;
	name: string;
1127
	folderUri: UriComponents | undefined;
A
Andre Weinand 已提交
1128
	configuration: IConfig;
1129 1130
}

A
Andre Weinand 已提交
1131 1132
export type IDebugSessionDto = IDebugSessionFullDto | DebugSessionUUID;

1133
export interface ExtHostDebugServiceShape {
J
Johannes Rieken 已提交
1134 1135 1136 1137
	$substituteVariables(folder: UriComponents | undefined, config: IConfig): Promise<IConfig>;
	$runInTerminal(args: DebugProtocol.RunInTerminalRequestArguments, config: ITerminalSettings): Promise<number | undefined>;
	$startDASession(handle: number, session: IDebugSessionDto): Promise<void>;
	$stopDASession(handle: number): Promise<void>;
1138
	$sendDAMessage(handle: number, message: DebugProtocol.ProtocolMessage): void;
1139
	$resolveDebugConfiguration(handle: number, folder: UriComponents | undefined, debugConfiguration: IConfig): Promise<IConfig | null | undefined>;
J
Johannes Rieken 已提交
1140 1141 1142
	$provideDebugConfigurations(handle: number, folder: UriComponents | undefined): Promise<IConfig[]>;
	$legacyDebugAdapterExecutable(handle: number, folderUri: UriComponents | undefined): Promise<IAdapterDescriptor>; // TODO@AW legacy
	$provideDebugAdapter(handle: number, session: IDebugSessionDto): Promise<IAdapterDescriptor>;
1143 1144
	$acceptDebugSessionStarted(session: IDebugSessionDto): void;
	$acceptDebugSessionTerminated(session: IDebugSessionDto): void;
1145
	$acceptDebugSessionActiveChanged(session: IDebugSessionDto | undefined): void;
1146 1147
	$acceptDebugSessionCustomEvent(session: IDebugSessionDto, event: any): void;
	$acceptBreakpointsDelta(delta: IBreakpointsDeltaDto): void;
1148 1149
}

1150

1151 1152 1153 1154 1155 1156
export interface DecorationRequest {
	readonly id: number;
	readonly handle: number;
	readonly uri: UriComponents;
}

1157
export type DecorationData = [number, boolean, string, string, ThemeColor, string];
1158
export type DecorationReply = { [id: number]: DecorationData };
1159 1160

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

1164 1165
export interface ExtHostWindowShape {
	$onDidChangeWindowFocus(value: boolean): void;
1166 1167
}

S
Sandeep Somavarapu 已提交
1168
export interface ExtHostLogServiceShape {
A
Alex Dima 已提交
1169
	$setLevel(level: LogLevel): void;
S
Sandeep Somavarapu 已提交
1170 1171
}

1172 1173 1174 1175
export interface ExtHostOutputServiceShape {
	$setVisibleChannel(channelId: string | null): void;
}

1176 1177 1178 1179
export interface ExtHostProgressShape {
	$acceptProgressCanceled(handle: number): void;
}

M
Matt Bierner 已提交
1180
export interface ExtHostCommentsShape {
1181
	$provideDocumentComments(handle: number, document: UriComponents): Promise<modes.CommentInfo | null>;
1182
	$createNewCommentThread(handle: number, document: UriComponents, range: IRange, text: string): Promise<modes.CommentThread | null>;
1183
	$onCommentWidgetInputChange(commentControllerHandle: number, input: string | undefined): Promise<number | undefined>;
P
Peng Lyu 已提交
1184
	$provideCommentingRanges(commentControllerHandle: number, uriComponents: UriComponents, token: CancellationToken): Promise<IRange[] | undefined>;
P
Peng Lyu 已提交
1185 1186
	$provideReactionGroup(commentControllerHandle: number): Promise<modes.CommentReaction[] | undefined>;
	$toggleReaction(commentControllerHandle: number, threadHandle: number, uri: UriComponents, comment: modes.Comment, reaction: modes.CommentReaction): Promise<void>;
1187
	$createNewCommentWidgetCallback(commentControllerHandle: number, uriComponents: UriComponents, range: IRange, token: CancellationToken): Promise<void>;
1188
	$replyToCommentThread(handle: number, document: UriComponents, range: IRange, commentThread: modes.CommentThread, text: string): Promise<modes.CommentThread | null>;
J
Johannes Rieken 已提交
1189 1190
	$editComment(handle: number, document: UriComponents, comment: modes.Comment, text: string): Promise<void>;
	$deleteComment(handle: number, document: UriComponents, comment: modes.Comment): Promise<void>;
1191 1192 1193
	$startDraft(handle: number, document: UriComponents): Promise<void>;
	$deleteDraft(handle: number, document: UriComponents): Promise<void>;
	$finishDraft(handle: number, document: UriComponents): Promise<void>;
P
Peng Lyu 已提交
1194 1195
	$addReaction(handle: number, document: UriComponents, comment: modes.Comment, reaction: modes.CommentReaction): Promise<void>;
	$deleteReaction(handle: number, document: UriComponents, comment: modes.Comment, reaction: modes.CommentReaction): Promise<void>;
1196
	$provideWorkspaceComments(handle: number): Promise<modes.CommentThread[] | null>;
M
Matt Bierner 已提交
1197 1198
}

1199
export interface ExtHostStorageShape {
1200
	$acceptValue(shared: boolean, key: string, value: object | undefined): void;
1201 1202
}

1203 1204 1205
// --- proxy identifiers

export const MainContext = {
1206 1207
	MainThreadClipboard: createMainId<MainThreadClipboardShape>('MainThreadClipboard'),
	MainThreadCommands: createMainId<MainThreadCommandsShape>('MainThreadCommands'),
M
Matt Bierner 已提交
1208
	MainThreadComments: createMainId<MainThreadCommentsShape>('MainThreadComments'),
1209
	MainThreadConfiguration: createMainId<MainThreadConfigurationShape>('MainThreadConfiguration'),
1210
	MainThreadConsole: createMainId<MainThreadConsoleShape>('MainThreadConsole'),
1211
	MainThreadDebugService: createMainId<MainThreadDebugServiceShape>('MainThreadDebugService'),
1212 1213 1214 1215
	MainThreadDecorations: createMainId<MainThreadDecorationsShape>('MainThreadDecorations'),
	MainThreadDiagnostics: createMainId<MainThreadDiagnosticsShape>('MainThreadDiagnostics'),
	MainThreadDialogs: createMainId<MainThreadDiaglogsShape>('MainThreadDiaglogs'),
	MainThreadDocuments: createMainId<MainThreadDocumentsShape>('MainThreadDocuments'),
1216
	MainThreadDocumentContentProviders: createMainId<MainThreadDocumentContentProvidersShape>('MainThreadDocumentContentProviders'),
1217
	MainThreadTextEditors: createMainId<MainThreadTextEditorsShape>('MainThreadTextEditors'),
1218 1219
	MainThreadErrors: createMainId<MainThreadErrorsShape>('MainThreadErrors'),
	MainThreadTreeViews: createMainId<MainThreadTreeViewsShape>('MainThreadTreeViews'),
A
Alex Dima 已提交
1220
	MainThreadKeytar: createMainId<MainThreadKeytarShape>('MainThreadKeytar'),
1221
	MainThreadLanguageFeatures: createMainId<MainThreadLanguageFeaturesShape>('MainThreadLanguageFeatures'),
1222
	MainThreadLanguages: createMainId<MainThreadLanguagesShape>('MainThreadLanguages'),
1223
	MainThreadMessageService: createMainId<MainThreadMessageServiceShape>('MainThreadMessageService'),
1224 1225
	MainThreadOutputService: createMainId<MainThreadOutputServiceShape>('MainThreadOutputService'),
	MainThreadProgress: createMainId<MainThreadProgressShape>('MainThreadProgress'),
1226
	MainThreadQuickOpen: createMainId<MainThreadQuickOpenShape>('MainThreadQuickOpen'),
1227
	MainThreadStatusBar: createMainId<MainThreadStatusBarShape>('MainThreadStatusBar'),
1228
	MainThreadStorage: createMainId<MainThreadStorageShape>('MainThreadStorage'),
1229
	MainThreadTelemetry: createMainId<MainThreadTelemetryShape>('MainThreadTelemetry'),
1230
	MainThreadTerminalService: createMainId<MainThreadTerminalServiceShape>('MainThreadTerminalService'),
M
Matt Bierner 已提交
1231
	MainThreadWebviews: createMainId<MainThreadWebviewsShape>('MainThreadWebviews'),
J
Joao Moreno 已提交
1232
	MainThreadUrls: createMainId<MainThreadUrlsShape>('MainThreadUrls'),
1233
	MainThreadWorkspace: createMainId<MainThreadWorkspaceShape>('MainThreadWorkspace'),
1234
	MainThreadFileSystem: createMainId<MainThreadFileSystemShape>('MainThreadFileSystem'),
1235
	MainThreadExtensionService: createMainId<MainThreadExtensionServiceShape>('MainThreadExtensionService'),
J
Joao Moreno 已提交
1236
	MainThreadSCM: createMainId<MainThreadSCMShape>('MainThreadSCM'),
1237
	MainThreadSearch: createMainId<MainThreadSearchShape>('MainThreadSearch'),
1238
	MainThreadTask: createMainId<MainThreadTaskShape>('MainThreadTask'),
1239
	MainThreadWindow: createMainId<MainThreadWindowShape>('MainThreadWindow'),
1240 1241 1242
};

export const ExtHostContext = {
1243
	ExtHostCommands: createExtId<ExtHostCommandsShape>('ExtHostCommands'),
1244
	ExtHostConfiguration: createExtId<ExtHostConfigurationShape>('ExtHostConfiguration'),
1245
	ExtHostDiagnostics: createExtId<ExtHostDiagnosticsShape>('ExtHostDiagnostics'),
1246
	ExtHostDebugService: createExtId<ExtHostDebugServiceShape>('ExtHostDebugService'),
J
Johannes Rieken 已提交
1247
	ExtHostDecorations: createExtId<ExtHostDecorationsShape>('ExtHostDecorations'),
1248
	ExtHostDocumentsAndEditors: createExtId<ExtHostDocumentsAndEditorsShape>('ExtHostDocumentsAndEditors'),
1249
	ExtHostDocuments: createExtId<ExtHostDocumentsShape>('ExtHostDocuments'),
J
Johannes Rieken 已提交
1250
	ExtHostDocumentContentProviders: createExtId<ExtHostDocumentContentProvidersShape>('ExtHostDocumentContentProviders'),
J
Johannes Rieken 已提交
1251
	ExtHostDocumentSaveParticipant: createExtId<ExtHostDocumentSaveParticipantShape>('ExtHostDocumentSaveParticipant'),
J
Johannes Rieken 已提交
1252
	ExtHostEditors: createExtId<ExtHostEditorsShape>('ExtHostEditors'),
1253
	ExtHostTreeViews: createExtId<ExtHostTreeViewsShape>('ExtHostTreeViews'),
J
Johannes Rieken 已提交
1254
	ExtHostFileSystem: createExtId<ExtHostFileSystemShape>('ExtHostFileSystem'),
J
Johannes Rieken 已提交
1255
	ExtHostFileSystemEventService: createExtId<ExtHostFileSystemEventServiceShape>('ExtHostFileSystemEventService'),
1256
	ExtHostHeapService: createExtId<ExtHostHeapServiceShape>('ExtHostHeapMonitor'),
1257
	ExtHostLanguageFeatures: createExtId<ExtHostLanguageFeaturesShape>('ExtHostLanguageFeatures'),
1258 1259
	ExtHostQuickOpen: createExtId<ExtHostQuickOpenShape>('ExtHostQuickOpen'),
	ExtHostExtensionService: createExtId<ExtHostExtensionServiceShape>('ExtHostExtensionService'),
1260
	ExtHostLogService: createExtId<ExtHostLogServiceShape>('ExtHostLogService'),
1261
	ExtHostTerminalService: createExtId<ExtHostTerminalServiceShape>('ExtHostTerminalService'),
J
Joao Moreno 已提交
1262
	ExtHostSCM: createExtId<ExtHostSCMShape>('ExtHostSCM'),
1263
	ExtHostSearch: createExtId<ExtHostSearchShape>('ExtHostSearch'),
1264
	ExtHostTask: createExtId<ExtHostTaskShape>('ExtHostTask'),
1265
	ExtHostWorkspace: createExtId<ExtHostWorkspaceShape>('ExtHostWorkspace'),
1266
	ExtHostWindow: createExtId<ExtHostWindowShape>('ExtHostWindow'),
1267
	ExtHostWebviews: createExtId<ExtHostWebviewsShape>('ExtHostWebviews'),
M
Matt Bierner 已提交
1268
	ExtHostProgress: createMainId<ExtHostProgressShape>('ExtHostProgress'),
1269
	ExtHostComments: createMainId<ExtHostCommentsShape>('ExtHostComments'),
1270
	ExtHostStorage: createMainId<ExtHostStorageShape>('ExtHostStorage'),
1271 1272
	ExtHostUrls: createExtId<ExtHostUrlsShape>('ExtHostUrls'),
	ExtHostOutputService: createMainId<ExtHostOutputServiceShape>('ExtHostOutputService'),
1273
};