Merge from vscode 27ada910e121e23a6d95ecca9cae595fb98ab568

This commit is contained in:
ADS Merger
2020-04-30 00:53:43 +00:00
parent 87e5239713
commit 93f35ca321
413 changed files with 7190 additions and 8756 deletions

View File

@@ -117,14 +117,34 @@ export class BrowserHostService extends Disposable implements IHostService {
const openable = toOpen[i];
openable.label = openable.label || this.getRecentLabel(openable);
// selectively copy payload: for now only extension debugging properties are considered
const originalPayload = this.workspaceProvider.payload;
let newPayload: Array<unknown> | undefined = undefined;
if (originalPayload && Array.isArray(originalPayload)) {
for (let pair of originalPayload) {
if (Array.isArray(pair) && pair.length === 2) {
switch (pair[0]) {
case 'extensionDevelopmentPath':
case 'debugId':
case 'inspect-brk-extensions':
if (!newPayload) {
newPayload = new Array();
}
newPayload.push(pair);
break;
}
}
}
}
// Folder
if (isFolderToOpen(openable)) {
this.workspaceProvider.open({ folderUri: openable.folderUri }, { reuse: this.shouldReuse(options, false /* no file */) });
this.workspaceProvider.open({ folderUri: openable.folderUri }, { reuse: this.shouldReuse(options, false /* no file */), payload: newPayload });
}
// Workspace
else if (isWorkspaceToOpen(openable)) {
this.workspaceProvider.open({ workspaceUri: openable.workspaceUri }, { reuse: this.shouldReuse(options, false /* no file */) });
this.workspaceProvider.open({ workspaceUri: openable.workspaceUri }, { reuse: this.shouldReuse(options, false /* no file */), payload: newPayload });
}
// File