Skip to content

Commit ea6c408

Browse files
authored
feat(tree-explorer): add clone document context menu item to document item in tree explorer VSCODE-350 (#458)
1 parent 18504a2 commit ea6c408

File tree

10 files changed

+534
-259
lines changed

10 files changed

+534
-259
lines changed

package-lock.json

Lines changed: 138 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,10 @@
413413
"command": "mdb.copyDocumentContentsFromTreeView",
414414
"title": "Copy Document"
415415
},
416+
{
417+
"command": "mdb.cloneDocumentFromTreeView",
418+
"title": "Clone Document..."
419+
},
416420
{
417421
"command": "mdb.deleteDocumentFromTreeView",
418422
"title": "Delete Document..."
@@ -613,6 +617,11 @@
613617
"when": "view == mongoDBConnectionExplorer && viewItem == documentTreeItem",
614618
"group": "2@1"
615619
},
620+
{
621+
"command": "mdb.cloneDocumentFromTreeView",
622+
"when": "view == mongoDBConnectionExplorer && viewItem == documentTreeItem",
623+
"group": "2@2"
624+
},
616625
{
617626
"command": "mdb.deleteDocumentFromTreeView",
618627
"when": "view == mongoDBConnectionExplorer && viewItem == documentTreeItem",
@@ -791,6 +800,10 @@
791800
"command": "mdb.copyDocumentContentsFromTreeView",
792801
"when": "false"
793802
},
803+
{
804+
"command": "mdb.cloneDocumentFromTreeView",
805+
"when": "false"
806+
},
794807
{
795808
"command": "mdb.deleteDocumentFromTreeView",
796809
"when": "false"
@@ -988,6 +1001,7 @@
9881001
"mongodb-connection-string-url": "^2.5.3",
9891002
"mongodb-data-service": "^22.1.1",
9901003
"mongodb-ns": "^2.4.0",
1004+
"mongodb-query-parser": "^2.4.6",
9911005
"mongodb-schema": "^9.0.0",
9921006
"numeral": "^2.0.6",
9931007
"react": "^16.14.0",

src/commands/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ enum EXTENSION_COMMANDS {
6161
MDB_INSERT_OBJECTID_TO_EDITOR = 'mdb.insertObjectIdToEditor',
6262
MDB_GENERATE_OBJECTID_TO_CLIPBOARD = 'mdb.generateObjectIdToClipboard',
6363
MDB_COPY_DOCUMENT_CONTENTS_FROM_TREE_VIEW = 'mdb.copyDocumentContentsFromTreeView',
64+
MDB_CLONE_DOCUMENT_FROM_TREE_VIEW = 'mdb.cloneDocumentFromTreeView',
6465
MDB_DELETE_DOCUMENT_FROM_TREE_VIEW = 'mdb.deleteDocumentFromTreeView',
6566
}
6667

0 commit comments

Comments
 (0)