Merge remote-tracking branch 'origin/master' into alex/semantic-exploration

This commit is contained in:
Alexandru Dima
2019-11-05 09:44:55 +01:00
1647 changed files with 66016 additions and 55795 deletions

View File

@@ -66,8 +66,8 @@ export interface ShellExecutionDTO {
options?: ShellExecutionOptionsDTO;
}
export interface CustomExecution2DTO {
customExecution: 'customExecution2';
export interface CustomExecutionDTO {
customExecution: 'customExecution';
}
export interface TaskSourceDTO {
@@ -84,11 +84,12 @@ export interface TaskHandleDTO {
export interface TaskDTO {
_id: string;
name?: string;
execution: ProcessExecutionDTO | ShellExecutionDTO | CustomExecution2DTO | undefined;
execution: ProcessExecutionDTO | ShellExecutionDTO | CustomExecutionDTO | undefined;
definition: TaskDefinitionDTO;
isBackground?: boolean;
source: TaskSourceDTO;
group?: string;
detail?: string;
presentationOptions?: TaskPresentationOptionsDTO;
problemMatchers: string[];
hasDefinedMatchers: boolean;

View File

@@ -7,6 +7,7 @@ import { URI } from 'vs/base/common/uri';
import * as vscode from 'vscode';
export interface WebviewInitData {
readonly isExtensionDevelopmentDebug: boolean;
readonly webviewResourceRoot: string;
readonly webviewCspSource: string;
}
@@ -17,7 +18,13 @@ export function asWebviewUri(
resource: vscode.Uri,
): vscode.Uri {
const uri = initData.webviewResourceRoot
.replace('{{resource}}', resource.toString().replace(/^\S+?:/, ''))
// Make sure we preserve the scheme of the resource but convert it into a normal path segment
// The scheme is important as we need to know if we are requesting a local or a remote resource.
.replace('{{resource}}', resource.scheme + withoutScheme(resource))
.replace('{{uuid}}', uuid);
return URI.parse(uri);
}
function withoutScheme(resource: vscode.Uri): string {
return resource.toString().replace(/^\S+?:/, '');
}