Merge remote-tracking branch 'origin/master' into 46192_terminal_renderer

This commit is contained in:
Daniel Imms
2018-06-14 10:59:08 +02:00
56 changed files with 563 additions and 426 deletions

View File

@@ -430,6 +430,7 @@ export interface MainThreadWebviewsShape extends IDisposable {
$reveal(handle: WebviewPanelHandle, viewColumn: EditorViewColumn | null, preserveFocus: boolean): void;
$setTitle(handle: WebviewPanelHandle, value: string): void;
$setHtml(handle: WebviewPanelHandle, value: string): void;
$setOptions(handle: WebviewPanelHandle, options: vscode.WebviewOptions): void;
$postMessage(handle: WebviewPanelHandle, value: any): Thenable<boolean>;
$registerSerializer(viewType: string): void;
@@ -855,7 +856,7 @@ export interface ExtHostTaskShape {
$onDidStartTaskProcess(value: TaskProcessStartedDTO): void;
$onDidEndTaskProcess(value: TaskProcessEndedDTO): void;
$OnDidEndTask(execution: TaskExecutionDTO): void;
$resolveVariables(workspaceFolder: URI, variables: string[]): TPromise<any>;
$resolveVariables(workspaceFolder: UriComponents, variables: string[]): TPromise<any>;
}
export interface IBreakpointDto {

View File

@@ -874,8 +874,9 @@ export class ExtHostTask implements ExtHostTaskShape {
});
}
public $resolveVariables(uri: URI, variables: string[]): any {
let result = Object.create(null);
public $resolveVariables(uriComponents: UriComponents, variables: string[]): any {
let uri: URI = URI.revive(uriComponents);
let result: { [key: string]: string; } = Object.create(null);
let workspaceFolder = this._workspaceService.resolveWorkspaceFolder(uri);
let resolver = new ExtHostVariableResolverService(this._workspaceService, this._editorService, this._configurationService);
let ws: IWorkspaceFolder = {
@@ -887,7 +888,7 @@ export class ExtHostTask implements ExtHostTaskShape {
}
};
for (let variable of variables) {
result.push(variable, resolver.resolve(ws, variable));
result[variable] = resolver.resolve(ws, variable);
}
return result;
}

View File

@@ -19,7 +19,7 @@ export class ExtHostWebview implements vscode.Webview {
private _options: vscode.WebviewOptions;
private _isDisposed: boolean = false;
readonly _onMessageEmitter = new Emitter<any>();
public readonly _onMessageEmitter = new Emitter<any>();
public readonly onDidReceiveMessage: Event<any> = this._onMessageEmitter.event;
constructor(
@@ -32,16 +32,16 @@ export class ExtHostWebview implements vscode.Webview {
this._options = options;
}
dispose() {
public dispose() {
this._onMessageEmitter.dispose();
}
get html(): string {
public get html(): string {
this.assertNotDisposed();
return this._html;
}
set html(value: string) {
public set html(value: string) {
this.assertNotDisposed();
if (this._html !== value) {
this._html = value;
@@ -49,11 +49,17 @@ export class ExtHostWebview implements vscode.Webview {
}
}
get options(): vscode.WebviewOptions {
public get options(): vscode.WebviewOptions {
this.assertNotDisposed();
return this._options;
}
public set options(newOptions: vscode.WebviewOptions) {
this.assertNotDisposed();
this._proxy.$setOptions(this._handle, newOptions);
this._options = newOptions;
}
public postMessage(message: any): Thenable<boolean> {
this.assertNotDisposed();
return this._proxy.$postMessage(this._handle, message);