Show in next view column when executing mongo commands (#1583)
This commit is contained in:
Родитель
40679bb3aa
Коммит
da1702e2a8
|
@ -8907,9 +8907,9 @@
|
|||
}
|
||||
},
|
||||
"vscode-azureextensionui": {
|
||||
"version": "0.33.5",
|
||||
"resolved": "https://registry.npmjs.org/vscode-azureextensionui/-/vscode-azureextensionui-0.33.5.tgz",
|
||||
"integrity": "sha512-hcOitRcu+iQlrJdHsPw2RZb473jgc8Xn1Gc/RLe3WSBp3KsSm1o+B8Q+0JBLsebLtBtTWjGopxS/JCFM2KYu5Q==",
|
||||
"version": "0.33.7",
|
||||
"resolved": "https://registry.npmjs.org/vscode-azureextensionui/-/vscode-azureextensionui-0.33.7.tgz",
|
||||
"integrity": "sha512-KO3aB/N+Mg8aAg++zZuZEUfaLTmqL6jW6wzaSacsWDOu0TqTiyRZEsgLjwLXUr1UlFVKjpeKbMXJlor7qFXCOQ==",
|
||||
"requires": {
|
||||
"azure-arm-resource": "^3.0.0-preview",
|
||||
"azure-arm-storage": "^3.1.0",
|
||||
|
|
|
@ -1037,7 +1037,7 @@
|
|||
"public-ip": "^4.0.0",
|
||||
"semver": "^7.2.2",
|
||||
"underscore": "^1.8.3",
|
||||
"vscode-azureextensionui": "^0.33.5",
|
||||
"vscode-azureextensionui": "^0.33.7",
|
||||
"vscode-json-languageservice": "^3.0.8",
|
||||
"vscode-languageclient": "^4.4.0",
|
||||
"vscode-languageserver": "^4.4.0",
|
||||
|
|
|
@ -112,7 +112,7 @@ async function executeCommand(context: IActionContext, command: MongoCommand): P
|
|||
// NOTE: Intentionally creating a _new_ tree item rather than searching for a cached node in the tree because
|
||||
// the executed 'find' command could have a filter or projection that is not handled by a cached tree node
|
||||
const node = new MongoCollectionTreeItem(database, collection, command.argumentObjects);
|
||||
await ext.fileSystem.showTextDocument(node);
|
||||
await ext.fileSystem.showTextDocument(node, { viewColumn: vscode.ViewColumn.Beside });
|
||||
} else {
|
||||
const result = await database.executeCommand(command, context);
|
||||
if (command.name === 'findOne') {
|
||||
|
@ -129,7 +129,7 @@ async function executeCommand(context: IActionContext, command: MongoCommand): P
|
|||
throw new Error(localize('failedToFind', 'Failed to find collection "{0}".', collectionName));
|
||||
}
|
||||
const docNode = new MongoDocumentTreeItem(colNode, document);
|
||||
await ext.fileSystem.showTextDocument(docNode);
|
||||
await ext.fileSystem.showTextDocument(docNode, { viewColumn: vscode.ViewColumn.Beside });
|
||||
} else {
|
||||
const viewColumn = vscode.window.activeTextEditor?.viewColumn;
|
||||
await vscodeUtil.showNewFile(result, 'result', '.json', viewColumn ? viewColumn + 1 : undefined);
|
||||
|
|
Загрузка…
Ссылка в новой задаче