From 2d81af35680a1f6c66da440ec38cbb6cb072a2a3 Mon Sep 17 00:00:00 2001 From: Rhys Howell Date: Mon, 11 May 2020 17:16:34 +0200 Subject: [PATCH 1/2] Update command argument passing --- src/editors/collectionDocumentsCodeLensProvider.ts | 2 +- src/editors/documentProvider.ts | 4 ++-- src/mdbExtensionController.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/editors/collectionDocumentsCodeLensProvider.ts b/src/editors/collectionDocumentsCodeLensProvider.ts index 387dee3ce..3a5464167 100644 --- a/src/editors/collectionDocumentsCodeLensProvider.ts +++ b/src/editors/collectionDocumentsCodeLensProvider.ts @@ -89,7 +89,7 @@ export default class CollectionDocumentsCodeLensProvider implements vscode.CodeL title: commandTitle, tooltip: commandTooltip, command: 'mdb.codeLens.showMoreDocumentsClicked', - arguments: [operationId, connectionId, namespace] + arguments: [{ operationId, connectionId, namespace }] }; return codeLens; diff --git a/src/editors/documentProvider.ts b/src/editors/documentProvider.ts index ed7b6f571..a88f36ae5 100644 --- a/src/editors/documentProvider.ts +++ b/src/editors/documentProvider.ts @@ -41,11 +41,11 @@ export default class DocumentViewProvider implements vscode.TextDocumentContentP // Ensure we're still connected to the correct connection. if (connectionId !== this._connectionController.getActiveConnectionId()) { vscode.window.showErrorMessage( - `Unable to list documents: no longer connected to ${connectionId}` + `Unable to fetch document: no longer connected to ${connectionId}` ); return reject( new Error( - `Unable to list documents: no longer connected to ${connectionId}` + `Unable to fetch document: no longer connected to ${connectionId}` ) ); } diff --git a/src/mdbExtensionController.ts b/src/mdbExtensionController.ts index b2a6962d2..781386895 100644 --- a/src/mdbExtensionController.ts +++ b/src/mdbExtensionController.ts @@ -154,7 +154,7 @@ export default class MDBExtensionController implements vscode.Disposable { registerEditorCommands(): void { this.registerCommand( 'mdb.codeLens.showMoreDocumentsClicked', - (operationId, connectionId, namespace) => { + ({ operationId, connectionId, namespace }) => { return this._editorsController.onViewMoreCollectionDocuments( operationId, connectionId, From 57fea7ba496f5fdd74c91810ad51d5d5eda3cdd2 Mon Sep 17 00:00:00 2001 From: Rhys Howell Date: Mon, 11 May 2020 17:23:24 +0200 Subject: [PATCH 2/2] Hide 'showActiveConnectionInPlayground' from command palette --- package.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package.json b/package.json index 641dfbcb8..71324ba52 100644 --- a/package.json +++ b/package.json @@ -431,6 +431,10 @@ "command": "mdb.createNewPlaygroundFromViewAction", "when": "false" }, + { + "command": "mdb.showActiveConnectionInPlayground", + "when": "false" + }, { "command": "mdb.copyConnectionString", "when": "false"