mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-01 22:12:26 +01:00
More adoption of @extHostNamedCustomer
This commit is contained in:
@@ -9,17 +9,23 @@ import { IMessageService, IChoiceService } from 'vs/platform/message/common/mess
|
||||
import Severity from 'vs/base/common/severity';
|
||||
import { Action } from 'vs/base/common/actions';
|
||||
import { TPromise as Promise } from 'vs/base/common/winjs.base';
|
||||
import { MainThreadMessageServiceShape } from '../node/extHost.protocol';
|
||||
import { MainThreadMessageServiceShape, MainContext, IExtHostContext } from '../node/extHost.protocol';
|
||||
import * as vscode from 'vscode';
|
||||
import { extHostNamedCustomer } from "vs/workbench/api/electron-browser/extHostCustomers";
|
||||
|
||||
@extHostNamedCustomer(MainContext.MainThreadMessageService)
|
||||
export class MainThreadMessageService implements MainThreadMessageServiceShape {
|
||||
|
||||
constructor(
|
||||
extHostContext: IExtHostContext,
|
||||
@IMessageService private _messageService: IMessageService,
|
||||
@IChoiceService private _choiceService: IChoiceService
|
||||
) {
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
}
|
||||
|
||||
$showMessage(severity: Severity, message: string, options: vscode.MessageOptions, commands: { title: string; isCloseAffordance: boolean; handle: number; }[]): Thenable<number> {
|
||||
if (options.modal) {
|
||||
return this.showModalMessage(severity, message, commands);
|
||||
|
||||
Reference in New Issue
Block a user