mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Merge from vscode 27ada910e121e23a6d95ecca9cae595fb98ab568
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user